Possible Duplicate:
How to detect Windows 64 bit platform with .net?
How do you know if the operating system is x64 or x86 from a c# .net 2.0 windows applicaiton?
Also the applicaiton is 32bit.
Thanks
Possible Duplicate:
How to detect Windows 64 bit platform with .net?
How do you know if the operating system is x64 or x86 from a c# .net 2.0 windows applicaiton?
Also the applicaiton is 32bit.
Thanks
Use GetEnvironmentVariable
to look for the PROCESSOR_ARCHITEW6432
variable. If it doesn't exist, you must be running 32bit:
bool is64bit = !string.IsNullOrEmpty(
Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"));
EDIT:
Thanks to Hans Passant for pointing out the error in using the PROCESSOR_ARCHITECTURE
variable.