title: How to detect Windows 64-bit platform with .NET?
body: <p>In a <a href="http://en.wikipedia.org/wiki/.NET_Framework" rel="noreferrer">.NET</a> 2.0 C# application I use the following code to detect the operating system platform:</p>
  
  <pre><code>string os_platform = System.Environment.OSVersion.Platform.ToString();
  </code></pre>
  
  <p>This returns "Win32NT". The problem is that it returns "Win32NT" even when running on Windows Vista 64-bit.</p>
  
  <p>Is there any other method to know the correct platform (32&nbsp;or 64&nbsp;bit)?</p>
  
  <p>Note that it should also detect 64&nbsp;bit when run as a 32&nbsp;bit application on Windows 64&nbsp;bit.</p>