Reputation: 21260
How i can know from the code if i run under x86 OS or under x64 OS .
Thanks for help.
Upvotes: 3
Views: 334
Reputation: 38434
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:
How to detect Windows 64-bit platform with .NET?
Upvotes: 11