IPGlobalProperties クラス
アセンブリ: System (system.dll 内)


このクラスは、ローカル コンピュータのネットワーク インターフェイスとネットワーク接続に関する構成情報と統計情報を提供します。
このクラスによって提供される情報は、Internet Protocol Helper API の関数によって提供される情報と同様です。Internet Protocol Helper の詳細については、MSDN ライブラリのドキュメントを参照してください。

このクラスのインスタンスを使用してローカル コンピュータに関する情報を表示するコード例を次に示します。
Public Shared Sub ShowInboundIPStatistics() Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties() Dim ipstat As IPGlobalStatistics = properties.GetIPv4GlobalStatistics() Console.WriteLine(" Inbound Packet Data:") Console.WriteLine(" Received ............................ : {0}", ipstat.ReceivedPackets) Console.WriteLine(" Forwarded ........................... : {0}", ipstat.ReceivedPacketsForwarded) Console.WriteLine(" Delivered ........................... : {0}", ipstat.ReceivedPacketsDelivered) Console.WriteLine(" Discarded ........................... : {0}", ipstat.ReceivedPacketsDiscarded) End Sub 'ShowInboundIPStatistics
public static void ShowInboundIPStatistics() { IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties(); IPGlobalStatistics ipstat = properties.GetIPv4GlobalStatistics(); Console.WriteLine(" Inbound Packet Data:"); Console.WriteLine(" Received ............................ : {0}", ipstat.ReceivedPackets); Console.WriteLine(" Forwarded ........................... : {0}", ipstat.ReceivedPacketsForwarded); Console.WriteLine(" Delivered ........................... : {0}", ipstat.ReceivedPacketsDelivered); Console.WriteLine(" Discarded ........................... : {0}", ipstat.ReceivedPacketsDiscarded); }

System.Net.NetworkInformation.IPGlobalProperties


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- IPGlobalProperties クラスのページへのリンク