What makes an application 64-bit?

Hi there;

I have C sharp forms application that I implemented in VS. 2008 resides program files x86 directory. I am planning to have a setup for it that I will create it from VS. 2008 itself?
1) the platform I implemented the program is Windows 7-64 bit. So is my application an 64-bit application?
2) If not, what makes an application 64-bit? What should I do for a C# application to work in 64-bit?

Best regards.
LVL 12
Who is Participating?
Contrary to C./C++ for example, you do not compile C#. The code to run it will be produced on the target machine by the .NET infrastructure (the CLR).  If the CLR runs in a 64-bit environment it will run as such.
Therefore as a developer you don't have to specify a target environment (32 vs 64).
One of the advantages of wrting .net apps.
In visual studio you can set a Target CPU.. by default its "AnyCPU" which allows it to run on x86 or x64 processors (32 or 64 bit)... you can change this if you want to make it more efficient.... x64 will run floating point calculations much faster then 32 while 32 will run some integer processes faster....

By default for now you don't need to worry about it as long as you haven't change the Target CPU, found in your project properties under compile....
Danirk is right. You may have seen an option called "Target CPU" in the advanced compilation tab of your project with options similar to "any, x86, x64,Itanium", but all this option does is give an indication of what CPU architecture your program should support: .NET always generates code in the same way no matter the option in the form of IL. It's the CLR at run time which will interpret the generated IL code to your running plateform.

Here is a nice article about all this:
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

No, You need to compile your application and specify that it should run on a 64-bit operating system either as a native application or under WOW64. WOW64 is a compatibility environment provided by the operating system that allows a 32-bit application to run on a Windows 64-bit operating system.
anki1110:Sorry to disagree with you. I suggest you really read the article that lenordiste suggested. (Nice article by the way).

The question was about  C#,  which can never run as a native application.

What you say could be relevant for an unmanaged C++ app, but this is not relevant here.
i totaly agree with danirk2..that was set by microsoft that the advantage of building .NET application is that it configures your application to work as the environment 32 or 64.but:
1) if you build it on 32 you cant run it on 64 else you build it on 64 and vice versa.
2) Don't make your self lose this great advantage (for example by seeting your integers to Int32 or anything like that) but yuo must define you variables like int  because it uses the system default data types lengths.
this is not right biogenus, the keyword "int" is always a 32 bit signed integer no matter what you do. You can look it up here: http://msdn.microsoft.com/en-us/library/5kzh1b5w(VS.80).aspx
The keyword "int" is only a shortcut for int32.

.NET executables will run fine in 32 bits and 64 bits environment no matter what you do (use int32 or int64) as long as you are working with type safe managed code (see this great piece: http://msdn.microsoft.com/en-us/library/ms973190.aspx).

So you can actually use int64 and run it on a 32 bit system without any problem. The only problem is that it won't be an atomic operation anymore since the CLR will have to make additionnal calculations which it won't have to do on a 64 bit plateform.

Finally, just to make sure no one gets confused, 64 bits is not faster than 32 bits if you don't plan ahead and make your algorithms take benefit of the 64 bit plateforms.

Ok thank you lenordiste.
you are right but i'm not totaly wrong...what i'm said is valid in unmanage languaues and i have a conflicted information due to data models that affect data types .... see this link:
jazzIIIloveAuthor Commented:
oh dear...I will read and reply each and every comment soon...
jazzIIIloveAuthor Commented:
sorry guys, I was late...I have a problem with a C# code that needs to run under SSH. If you want, you can join there too since, I really get the idea of arch. since some dlls of mine are compiled under 64-bit etc.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.