title: Recent OpenHardwareMonitor Sample Code C#
body: <p>Does anybody know where I can find any recent samples for using OpenHardwareMonitor.dll in C#.
  I've tried a simple implementation but cannot get the cpu Temp. I know the library must have it since the app itself gets the temperature. </p>
  
  <p>I have a feeling you have to register events to get readings on certain things but I'm finding it difficult to find a good example.</p>
  
  <pre><code>Computer myComputer = new Computer();
  
              myComputer.Open();
  
              foreach (var hardwareItem in myComputer.Hardware)
              {
  
                  if (hardwareItem.HardwareType == HardwareType.CPU)
                  {
                      foreach (var sensor in hardwareItem.Sensors)
                      {
                          if (sensor.SensorType == SensorType.Temperature)
                          {
                              Console.WriteLine(sensor.Value);
                          }
                      }
                  }
  
              }
  </code></pre>
  
  <p>Any thoughts or insight would be appreciated.</p>