Description:
Following code can be used to get system information like AvailablePhysicalMemory, AvailableVirtualMemory,
InstalledUICulture, OSFullName, OSPlatform, OSVersion etc..
static void Main(string[] args)
{
Console.WriteLine("AvailablePhysicalMemory = {0}",
new
Microsoft.VisualBasic.Devices.ComputerInfo().AvailablePhysicalMemory);
Console.WriteLine("AvailableVirtualMemory = {0}",
new
Microsoft.VisualBasic.Devices.ComputerInfo().AvailableVirtualMemory);
Console.WriteLine("InstalledUICulture = {0}",
new
Microsoft.VisualBasic.Devices.ComputerInfo().InstalledUICulture);
Console.WriteLine("OSFullName = {0}",
new
Microsoft.VisualBasic.Devices.ComputerInfo().OSFullName);
Console.WriteLine("OSPlatform =
{0}",
new
Microsoft.VisualBasic.Devices.ComputerInfo().OSPlatform);
Console.WriteLine("OSVersion = {0}",
new
Microsoft.VisualBasic.Devices.ComputerInfo().OSVersion);
Console.WriteLine("TotalVirtualMemory
= {0}",
new
Microsoft.VisualBasic.Devices.ComputerInfo().TotalVirtualMemory / (1024 * 1024));
Console.ReadLine();
}
No comments:
Post a Comment