Getting information about the system in .NET
Posted: (EET/GMT+2)
If you have programmed .NET with C# or Delphi, the chances are you have had the need to get information about the operating system that your application runs on. Depending on the information you are looking for, there are several classes in .NET BCL that help you get the information you need. For basic information, there's the System.Environment class. However, if you are interested in information about the Windows user interface and graphics setup, such as screen size, number of mouse buttons, and so on, you can use the System.Windows.Forms.SystemInformation class.
This class has over 100 properties that you will find especially useful in WinForms programming. This is the reason this class is part of the System.Windows.Forms namespace. However, it is worth noting that some of the properties duplicate functionality in the System.Environment class. From this perspective the differentiation between "WinForms useful information" and "generally useful information" isn't clear, but the idea is that if you choose to use the SystemInformation class, you can get most of the information you need from one place.