Get Your Hardware Information Using C#


In this article I will discuss how to get information about your system hardware such as available CPU Id, Physical Memory, BIOS-Information, CPU-Speed, Motherboard Maker, CPU Maker.

The first way is by using Windows Management Instrumentation (WMI) provided by the System.Management namespace. You simply call the Class-Name.

For Example:

Hardware.gif

This code gives you information about the Processor Id.

lblPid.Text = HardwareInfo.GetProcessorId();

This code gives you the HDD Serial No.

lblHDD.Text = HardwareInfo.GetHDDSerialNo();

This code gives you the Board Maker.

lblBM.Text = HardwareInfo.GetBoardMaker();

This code gives you the Information about BIOS Maker.

lblBios.Text = HardwareInfo.GetBIOSmaker();

This code gives you the Information about RAM Memory.

lblPM.Text = HardwareInfo.GetPhysicalMemory();

This code gives you the Information about CPU Speed.

lblCS.Text = HardwareInfo.GetCpuSpeedInGHz().ToString();

This code gives you the Information about CPU Maker.

lblCM.Text = HardwareInfo.GetCPUManufacturer();

Up Next
    Ebook Download
    View all
    Learn
    View all