System.Net.NetworkInformation 命名空間

提供網路流量資料、網路位址資訊和本機電腦位址變更通知的存取方式。 Provides access to network traffic data, network address information, and notification of address changes for the local computer. 此命名空間也包含實作 Ping 公用程式的類別。 The namespace also contains classes that implement the Ping utility. 您可以使用 Ping 和相關類別,檢查電腦是否可透過網路存取。 You can use Ping and related classes to check whether a computer is reachable across the network.

類別

GatewayIPAddressInformation

表示網路閘道的 IP 位址。Represents the IP address of the network gateway. 無法執行個體化這個類別。This class cannot be instantiated.

GatewayIPAddressInformationCollection

儲存一組 GatewayIPAddressInformation 型別。Stores a set of GatewayIPAddressInformation types.

IcmpV4Statistics

提供本機電腦之 IPv4 的網際網路控制訊息通訊協定 (ICMPv4) 統計資料。Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.

IcmpV6Statistics

提供本機電腦之網際網路通訊協定第 6 版的網際網路控制訊息通訊協定 (ICMPv6) 統計資料。Provides Internet Control Message Protocol for Internet Protocol version 6 (ICMPv6) statistical data for the local computer.

IPAddressCollection

儲存一組 IPAddress 型別。Stores a set of IPAddress types.

IPAddressInformation

提供網路介面位址的相關資訊。Provides information about a network interface address.

IPAddressInformationCollection

儲存一組 IPAddressInformation 型別。Stores a set of IPAddressInformation types.

IPGlobalProperties

提供本機電腦之網路連接的相關資訊。Provides information about the network connectivity of the local computer.

IPGlobalStatistics

提供網際網路通訊協定 (IP) 統計資料。Provides Internet Protocol (IP) statistical data.

IPInterfaceProperties

提供支援網際網路通訊協定第 4 版 (IPv4) 或網際網路通訊協定第 6 版 (IPv6) 的網路介面相關資訊。Provides information about network interfaces that support Internet Protocol version 4 (IPv4) or Internet Protocol version 6 (IPv6).

IPInterfaceStatistics

提供本機電腦網路介面的網際網路通訊協定 (IP) 統計資料。Provides Internet Protocol (IP) statistical data for an network interface on the local computer.

IPv4InterfaceProperties

提供支援網際網路通訊協定第 4 版 (IPv4) 之網路介面的相關資訊。Provides information about network interfaces that support Internet Protocol version 4 (IPv4).

IPv4InterfaceStatistics

提供本機電腦上之網路介面的統計資料。Provides statistical data for a network interface on the local computer.

IPv6InterfaceProperties

提供支援網際網路通訊協定第 6 版 (IPv6) 之網路介面的相關資訊。Provides information about network interfaces that support Internet Protocol version 6 (IPv6).

MulticastIPAddressInformation

提供網路介面之多點傳送位址的相關資訊。Provides information about a network interface's multicast address.

MulticastIPAddressInformationCollection

儲存一組 MulticastIPAddressInformation 型別。Stores a set of MulticastIPAddressInformation types.

NetworkAvailabilityEventArgs

提供 NetworkAvailabilityChanged 事件的資料。Provides data for the NetworkAvailabilityChanged event.

NetworkChange

允許應用程式在網路介面 (也稱為網路卡或介面卡) 的網際網路通訊協定 (IP) 位址變更時收到通知。Allows applications to receive notification when the Internet Protocol (IP) address of a network interface, also called a network card or adapter, changes.

NetworkInformationException

擷取網路資訊期間發生錯誤時擲回的例外狀況。The exception that is thrown when an error occurs while retrieving network information.

NetworkInformationPermission

控制對本機電腦之網路資訊及流量統計資料的存取。Controls access to network information and traffic statistics for the local computer. 此類別無法獲得繼承。This class cannot be inherited.

NetworkInformationPermissionAttribute

允許將 NetworkInformationPermission 的安全性動作套用至使用宣告式安全性的程式碼。Allows security actions for NetworkInformationPermission to be applied to code using declarative security.

NetworkInterface

提供網路介面的組態和統計資訊。Provides configuration and statistical information for a network interface.

PhysicalAddress

提供網路介面 (介面卡) 的媒體存取控制 (MAC) 位址。Provides the Media Access Control (MAC) address for a network interface (adapter).

Ping

可以讓應用程式判斷是否能透過網路存取遠端電腦。Allows an application to determine whether a remote computer is accessible over the network.

PingCompletedEventArgs

提供 PingCompleted 事件的資料。Provides data for the PingCompleted event.

PingException

SendSendAsync 方法呼叫會擲回例外狀況的方法時,所擲回的例外狀況。The exception that is thrown when a Send or SendAsync method calls a method that throws an exception.

PingOptions

用來控制如何傳送 Ping 資料封包。Used to control how Ping data packets are transmitted.

PingReply

提供由於 SendSendAsync 作業而產生的狀態和資料等相關資訊。Provides information about the status and data resulting from a Send or SendAsync operation.

TcpConnectionInformation

提供本機電腦上的傳輸控制通訊協定 (TCP) 連線資訊。Provides information about the Transmission Control Protocol (TCP) connections on the local computer.

TcpStatistics

提供傳輸控制通訊協定 (TCP) 統計資料。Provides Transmission Control Protocol (TCP) statistical data.

UdpStatistics

提供使用者資料包通訊協定 (User Datagram Protocol,UDP) 統計資料。Provides User Datagram Protocol (UDP) statistical data.

UnicastIPAddressInformation

提供網路介面之單點傳送位址的相關資訊。Provides information about a network interface's unicast address.

UnicastIPAddressInformationCollection

儲存一組 UnicastIPAddressInformation 型別。Stores a set of UnicastIPAddressInformation types.

列舉

DuplicateAddressDetectionState

指定 IP 位址的目前狀態。Specifies the current state of an IP address.

IPStatus

報告將網際網路控制訊息通訊協定 (ICMP) 回應訊息傳送至電腦的狀態。Reports the status of sending an Internet Control Message Protocol (ICMP) echo message to a computer.

NetBiosNodeType

指定 Network Basic Input/Output System (NetBIOS) 節點型別。Specifies the Network Basic Input/Output System (NetBIOS) node type.

NetworkInformationAccess

指定存取網路介面和流量統計資料之相關資訊的使用權限。Specifies permission to access information about network interfaces and traffic statistics.

NetworkInterfaceComponent

指定網路介面所支援的網際網路通訊協定版本。Specifies the Internet Protocol versions that are supported by a network interface.

NetworkInterfaceType

指定網路介面的類型。Specifies types of network interfaces.

OperationalStatus

指定網路介面的操作狀態。Specifies the operational state of a network interface.

PrefixOrigin

指定如何找到 IP 位址網路首碼。Specifies how an IP address network prefix was located.

ScopeLevel

IPv6 位址的範圍層級。The scope level for an IPv6 address.

SuffixOrigin

指定如何找到 IP 位址主機尾碼。Specifies how an IP address host suffix was located.

TcpState

指定傳輸控制通訊協定 (TCP) 連線的狀態。Specifies the states of a Transmission Control Protocol (TCP) connection.

委派

NetworkAddressChangedEventHandler

參考網路介面位址變更時所要呼叫的一或多個方法。References one or more methods to be called when the address of a network interface changes.

NetworkAvailabilityChangedEventHandler

參考網路可用性變更時所要呼叫的一或多個方法。References one or more methods to be called when the availability of the network changes.

PingCompletedEventHandler

表示將會處理 PingCompleted 物件的 Ping 事件的方法。Represents the method that will handle the PingCompleted event of a Ping object.

另請參閱