How To Find Whether The Machine Is of 32-Bit/64-Bit Architecture

The easiest way to find out the processor architecture is to use the Environment class GetEnvironmentVariable method.

Console.WriteLine(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"));

This will print the processor architecture on the console window i.e. x86 and x64 for 32-bit and 64-bit respectively.

comments powered by Disqus