IPGlobalProperties Class
.NET Framework 3.0
Provides information about the network connectivity of the local computer.
Namespace: System.Net.NetworkInformation
Assembly: System (in system.dll)
Assembly: System (in system.dll)
This class provides configuration and statistical information about the local computer's network interfaces and network connections.
The information provided by this class is similar to that provided by the Internet Protocol Helper API functions. For information about the Internet Protocol Helper, see the documentation in the MSDN Library.
The following code example displays information about the local computer using an instance of this class.
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
Windows 98, Windows Server 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
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: