How i can know from the code if i run under x86 OS or under x64 OS .
Thanks for help.
How i can know from the code if i run under x86 OS or under x64 OS .
Thanks for help.
You can use the following Environment
properties:
System.Environment.Is64BitOperatingSystem
System.Environment.Is64BitProcess
Update
For platforms previous to .Net 4.0, the following can be used to implement the above functionality:
bool is64bit = IntPtr.Size == 8;