System.Net.NetworkInformation
public abstract class IPNetworkInformation
The IPNetworkInformation
class is an abstract base class that provides common properties and methods for network interface information. Specific implementations, such as UnicastIPAddressInformationCollection
and GatewayIPAddressInformationCollection
, derive from this class to provide detailed information about IP addresses, gateways, and other network-related data.
This class is part of the .NET Framework's networking capabilities, allowing developers to programmatically access and manage network configuration on a local machine. It's particularly useful for diagnostics, network monitoring, and customizing network behavior.
You will typically interact with derived classes of IPNetworkInformation
when querying network interface details using classes like NetworkInterface
.
public abstract GatewayIPAddressInformationCollection GatewayAddresses { get; }
Retrieves a collection of IP addresses that represent the gateways configured for this network interface.
public abstract bool IsDnsEnabled { get; }
Indicates whether the Dynamic Host Configuration Protocol (DHCP) is enabled for this network interface.
public abstract bool IsMulticastEnabled { get; }
Indicates whether IP multicast is enabled for this network interface.
public abstract string NetbiosName { get; }
Retrieves the NetBIOS name of the local computer.
public abstract NetworkCategory NetworkCategory { get; }
Gets the network category of the network interface. This can be Public, Private, or DomainAuthenticated.
public abstract PrefixOrigin PrefixOrigin { get; }
Indicates the origin of the IP address prefix. This is typically used for IPv6 addresses.
public abstract SuffixOrigin SuffixOrigin { get; }
Indicates the origin of the IP address suffix. This is typically used for IPv6 addresses.
public abstract UnicastIPAddressInformationCollection UnicastAddresses { get; }
Retrieves a collection of unicast IP addresses assigned to this network interface.
System.Object
System.Net.NetworkInformation.IPNetworkInformation
Derived classes include:
System.Net.NetworkInformation.IPInterfaceProperties
(abstract base for network interface specific properties)System.Net.NetworkInformation.TcpStatistics
System.Net.NetworkInformation.UdpStatistics