get system type in csharp

To get the system type (32-bit or 64-bit), you can use the Environment class in C#:

main.cs
string systemType = Environment.Is64BitOperatingSystem ? "64-bit" : "32-bit";
Console.WriteLine("System type: " + systemType);
127 chars
3 lines

The Environment.Is64BitOperatingSystem property returns true if the operating system is 64-bit, and false otherwise.

gistlibby LogSnag