.NET Framework 4.0 : How to get the Operating System 32 or 64 bits

0 views
Skip to first unread message

Amirpooyan Raeessi

unread,
Mar 21, 2011, 5:44:47 AM3/21/11
to

How to get the Operating System 32 or 64 bits:



    class Program
    {
        static void Main(string[] args)
        {
            if (Environment.Is64BitOperatingSystem)
            {
                Console.WriteLine("This is 64 bit operating system");
            }
            else
            {
                Console.WriteLine("This is 32 bit operating system");
            }
            Console.ReadKey();
        }
    }
Reply all
Reply to author
Forward
0 new messages