title: Get name of network that a network interface is connected to
body: <p>In Windows Control Panel, you can find a list of network interfaces/connections which displays the following:</p>
  
  <p><a href="https://i.stack.imgur.com/hrqbo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hrqbo.png" alt="network interfaces"></a></p>
  
  <p>In the .NET framework these are represented in the <code>NetworkInterface</code> class (and found via <code>NetworkInterface.GetAllNetworkInterfaces</code>).</p>
  
  <p>For reference, say I'm reading properties from the Ethernet interface - the <code>NetworkInterface.Name</code> property returns <code>"Ethernet"</code>, the <code>NetworkInterface.Description</code> property returns <code>"Realtek PCIe FE Family Controller"</code>. </p>
  
  <p>However, nothing in the class seems to be able to get me the name of the network it's connected to (in this case <code>"BELL024"</code>). How would I go about getting that string? I have to know what network the interface is associated with, not just a list of the networks that exist.</p>