<p>How do I tell if my application (compiled in Visual&nbsp;Studio&nbsp;2008 as <em>Any CPU</em>) is running as a 32-bit or 64-bit application?</p>

I found this code from
Martijn Boven
that does the trick:
```
```
public static bool Is64BitMode() {
    return System.Runtime.InteropServices.Marshal.SizeOf(typeof(IntPtr)) == 8;
}
```
```