E
E
ellz2018-12-16 20:58:16
C++ / C#
ellz, 2018-12-16 20:58:16

Is there any package/library in C# that makes it easier to get data about CPU, GPU and so on?

Is there any package/library in C# that makes it easier to get data about CPU, GPU and so on? To avoid writing code like this:

public string CPUTemp()
        {
            ManagementObjectSearcher mos = new ManagementObjectSearcher(@"root\WMI", "SELECT * FROM MSAcpi_ThermalZoneTemperature");
            double temp = 0;
            foreach (ManagementObject mo in mos.Get())
            {
                temp = Convert.ToDouble(mo["CurrentTemperature"].ToString());

                temp = (temp - 2732) / 10.0;                
            }
            return temp.ToString();
        }
, but something in a couple of lines?
Or how to google in English?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Pogrebnyak, 2018-12-16
@ellz

Or how to google in English?

get gpu/cpu temp c#

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question