Reputation: 3003
How to display platform target.
I have an .net window form which is compiled for x86 os how? do i display platform target on a label.
Thank you.
Upvotes: 2
Views: 2638
Reputation: 38025
If you are looking for 32 bit vs 64 bit you can check the size of an IntPtr (it will be either 32 bits or 64 bits as per the documentation).
public static string Platform
{
get
{
if (IntPtr.Size == 8)
return "x64";
else
return "x86";
}
}
Upvotes: 5