如何显示平台目标。
我有一个.net窗口表单,它是为x86 os编译的如何?在标签上显示平台目标。
谢谢。
答案 0 :(得分:5)
如果您正在寻找32位与64位,您可以检查IntPtr的大小(根据documentation,它将是32位或64位)。
public static string Platform
{
get
{
if (IntPtr.Size == 8)
return "x64";
else
return "x86";
}
}
答案 1 :(得分:0)