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 ...

Get Visual Basic 2008 Recipes: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.