title: Check if VPN exist in vb.net
body: <p>I'm trying to figure out how to check if my VPN connection is active.</p>
  
  <p>With this code i see all my networks connection</p>
  
  <pre><code>Dim nics As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces
      If nics.Length &lt; 0 Or nics Is Nothing Then
          MsgBox("No NICS")
          Exit Sub
      End If
      ListBox1.Items.Clear()
      For Each netadapter As NetworkInterface In nics
          Dim intproperties As IPInterfaceProperties = netadapter.GetIPProperties()
          ListBox1.Items.Add(netadapter.Name)
      Next
  </code></pre>
  
  <p>When my vpn connection is active i see in that list "VPN"</p>
  
  <p>How can i check if there is no "VPN" in that list or even without ListBox?</p>