It’s easy to determine if your C# application is 64-bit.  Just check the Size property of IntPtr.  If it’s 8, then your application is 64-bit.  If it’s 4, then your application is 32-bit.

Here is a simple C# console program to demonstrate this:

using System;

namespace CSharp411
{
    class Program
    {
        static void Main( string[] args )
        {
            int bits = IntPtr.Size * 8;
            Console.WriteLine( "{0}-bit", bits );
            Console.ReadLine();
        }
    }
}
Share and Enjoy:
  • Digg
  • Twitter
  • Facebook
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Google Bookmarks
  • Slashdot