title: Call VB.NET method via .dll from C# program
body: <p>my code contain a VB.Net Class that i have built into a .dll that will be used inside a C#-WPF program, the problem is when i try to call any function from that .dll i get an error saying:</p>
  
  <blockquote>
    <p>the methode have some invalide argument</p>
  </blockquote>
  
  <p>my vb code :</p>
  
  <pre><code>Public Function PerformDCVoltageMeasurement_niDMM(ByRef dDMM_Reading As Double) As Boolean
      Try
  
          Call Initialize_niDMM(GetInstrumentAddress(sPXIInstrument).DeviceAddress, DC_VOLTS, 60, 100, 3.5)
          Dim dTemp As Double
          'Start the acquisition
          NIpxiDMM.Initiate()
          NIpxiDMM.Fetch(-1, dTemp)
          dDMM_Reading = dTemp
          NIpxiDMM.Dispose()
          Return True
  
      Catch
          gsCurrentPXIDeviceAddress_dmm = ""
          NIpxiDMM.Dispose()
          Return False
      End Try
  End Function
  </code></pre>
  
  <p>and my C#-wpf code :</p>
  
  <pre><code>SwitchExecutive.SwitchExecutive SwitchControl = new SwitchExecutive.SwitchExecutive();
  Double Jg;
  SwitchControl.PerformDCVoltageMeasurement_niDMM(out Jg);
  </code></pre>
  
  <p>The last statement gives an error</p>
  
  <blockquote>
    <p>Methode have some invalid argument </p>
  </blockquote>