How do I determine if a .NET application is 32 or 64 bit?

后端 未结 7 1122
天涯浪人
天涯浪人 2021-01-30 20:33

I have a .NET application that was supposed to be compiled as a 32-bit only application. I suspect my build server isn\'t actually doing it.

How do I determine if a .NE

7条回答
  •  孤街浪徒
    2021-01-30 21:17

    To do this at runtime...

    You can evaluate IntPtr.Size. If IntPtr.Size == 4 then it's 32 bit (4 x 8). If IntPtr.Size == 8 then it's 64 bit (8 x 8)

提交回复
热议问题