title: Openhardwaremontor.dll function access in VB.net
body: <p>I am trying to use Openhardwaremonitor.dll to read CPU temperature, but not able to get it right.</p>
  
  <pre><code>If cp. = SensorType.Temperature Then
                      Trace.WriteLine([String].Format("{0} Temperature = {1}", sensor.Name, If(sensor.Value.HasValue, sensor.Value.Value.ToString(), "no value")))
                  End If
  </code></pre>
  
  <p>The Error is saying:</p>
  
  <blockquote>
    <p>Error 4   'OpenHardwareMonitor.Hardware.Sensor' is not accessible in
    this context because it is 'Friend'.</p>
  </blockquote>
  
  <p>however a friend function should be accessible as I've imported the DLL in the program.</p>
  
  <p>Please help </p>