11.1. Obtain Information About the Local Network Interface
You need to obtain information about the network adapters and network configuration of the local machine.
Call the Shared method GetAllNetworkInterfaces of the System.Net.NetworkInformation.NetworkInterface class to get an array of objects derived from the abstract class NetworkInterface. Each object represents a network interface available on the local machine. Use the members of each NetworkInterface object to retrieve configuration information and network statistics for that interface.
How It Works
The System.Net.NetworkInformation namespace, which was first introduced in .NET Framework 2.0, provides easy access to information about network configuration and statistics ...