Briefly translated from VB code in a quick basic search:
public class Form1
{
private void Button1_Click(object sender, EventArgs e)
{
try {
ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\WMI", "SELECT * FROM MSAcpi_ThermalZoneTemperature");
foreach (ManagementObject queryObj in searcher.Get()) {
double temp = double.Parse(queryObj["CurrentTemperature"]);
temp = (temp - 2732) / 10d;
MessageBox.Show(temp.ToString());
}
catch (ManagementException err) {
MessageBox.Show("An error occurred while querying for WMI data: " + err.Message);
}
}
}
WMI Administrative Tools[
^] could be of great help, too.