4

Possible Duplicate:
How to detect Windows 64 bit platform with .net?

Hi all, I am currently developing an application in c# and would like to know if it is possible using code to determine if the OS the computer is running is 32bit or 64 bit. The program I am writing is compiled as 32 bit but need to know if it is running on 64 bit or not.

Thanks

Community
  • 1
  • 1
Boardy
  • 35,417
  • 104
  • 256
  • 447
  • 3
    Duplicate of [How to detect Windows 64 bit platform with .net?](http://stackoverflow.com/questions/336633/how-to-detect-windows-64-bit-platform-with-net) – Michael Petrotta Dec 04 '10 at 22:11
  • None of the answers in the linked thread will work when the code lives in a DLL compiled with AnyCPU as the platform target. Not a problem here though, good to know you're running x86. – Hans Passant Dec 04 '10 at 22:42
  • @Hans Passant: Why would the detection fail in the case you describe? I can't see a reason why this should be the case for the accepted answer. – Dirk Vollmar Dec 04 '10 at 22:52

0 Answers0