title: Convert vb6 code to vb.net?
body: <p>I am trying to get this PID control code into my VB.net project, but am a bit clueless about all the exclamation marks.  Can someone explain to me how to implement this code in VB.NET?  </p>
  
  <pre><code>Dim Er!, Derivative!, Proportional!
  
      Static Olderror!, Cont!, Integral!
      Static Limiter_Switch%
      Limiter_Switch% = 1
  
      Er = setpoint - process
  
      If ((Cont &gt;= 1 And Er &gt; 0) Or (Cont &lt;= 0 And Er &lt; 0) Or (Integ &gt;= 9999)) Then
          Limiter_Switch = 0
      Else
          Limiter_Switch = 1
      End If
      Integral = Integral + Gain / Integ * Er * deltaT * Limiter_Switch
  
      Derivative = Gain * deriv * (Er - Olderror) / deltaT
  
      Proportional = Gain * Er
  
      Cont = Proportional + Integral + Derivative
      Olderror = Er
  
      If (Cont &gt; 1) Then
          Cont = 1
      End If
      If (Cont &lt; 0) Then
          Cont = 0
      End If
      Return ()
  </code></pre>