title: Deactivate Return-Value-Assignment to a Function in VB.net
body: <p>Is there a way to deactivate the following behavior of the IDE?
  This is very silly and you don't see this error at once. Hopy my comments in the coding explain it well.</p>
  
  <p>As you see both lines return different things:</p>
  
  <p><em>Faulty Line (Returns "false" because it addresses the return value of the function I am in)</em></p>
  
  <pre><code>If HasIpAddress Then
  </code></pre>
  
  <p><em>Correct Line (Adresses the function with an other signature):</em></p>
  
  <pre><code>If HasIpAddress() Then
  </code></pre>
  
  <p>Coding:</p>
  
  <pre><code>Public Shared Function HasIpAddress(ByVal p_WaitTimeInSeconds As Integer) As Boolean
  
      Dim dEnd As Date = Date.Now.AddSeconds(p_WaitTimeInSeconds)
  
      While dEnd &gt; Date.Now
  
          If HasIpAddress Then ' THIS is the faulty line. 
          ' If HasIpAddress() Then ' THIS line would work, because of the "()"
          ' it addresses the function without parameters and not 
          ' the return-value of the current function I am in.
              Return True
          End If
  
          System.Threading.Thread.Sleep(100)
  
      End While
  
      Return False
  
  End Function
  
  Public Shared Function HasIpAddress() As Boolean
  
       With System.Net.IPAddress.Parse(NetworkTools.GetMyIpAddress())
             ...Check for Loopbacks, Any, None etc...
       End While
  
       Return True
  
  End Function
  </code></pre>