title: How to detect static or dynamic IP address in vb.net?
body: <p>I have got following code from <a href="https://stackoverflow.com/questions/890449/checking-static-or-dynamic-ip-address-in-c-sharp-net">Checking static or dynamic IP address in C# .NET?</a></p>
  
  <pre><code>Imports System.Net.NetworkInformation
  
  Private niAdpaters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
  
  Private Function GetDhcp(iSelectedAdpater As Int32) As [Boolean]
      If niAdpaters(iSelectedAdpater).GetIPProperties().GetIPv4Properties() IsNot Nothing Then
          Return niAdpaters(iSelectedAdpater).GetIPProperties().GetIPv4Properties().IsDhcpEnabled
      Else
          Return False
      End If
  End Function
  </code></pre>
  
  <p>But I dont understand how to use above code.</p>