User6996
User6996

Reputation: 3003

C# How to Display platform target

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

Answers (2)

Brian
Brian

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

Ta01
Ta01

Reputation: 31610

This link might help you, this has the list of contents to help you display what you need.

Upvotes: 0

Related Questions