| The SystemInformation class in C# provides static methods to retrieve information about the user's system, including screen resolution, available memory, operating system version, and other system-related details. It allows developers to tailor their applications to the user's environment, providing a more personalized experience. When system information is required in application, SystemInformation global instance is very useful.
In case of getting Monitor Size, Virtual Screen, Computer Name, Keyboard Delay, Network Connection, Power Status, and other system variables, SystemInformation instance is very useful.
Following reference code is the example. //Namespace reference
using System:
.
.
.
Hashtable sysValues = new Hashtable();
sysValues.Add("Monitor Size: ", SystemInformation.PrimaryMonitorSize);
sysValues.Add("VirtualScreen: ", SystemInformation.VirtualScreen);
sysValues.Add("Working Size: ", SystemInformation.WorkingArea);
sysValues.Add("Computer Name: ", SystemInformation.ComputerName);
sysValues.Add("Keyboard Delay: ", SystemInformation.KeyboardDelay);
sysValues.Add("Total Monitors: ", SystemInformation.MonitorCount);
sysValues.Add("Network Connection: ", SystemInformation.Network);
sysValues.Add("Power Status: ", SystemInformation.PowerStatus);
.
.
|