In The Hand - .NET Components for Mobility
IPGlobalProperties Class
NamespacesInTheHand.Net.NetworkInformationIPGlobalProperties
Provides information about the network connectivity of the local computer.
Declaration Syntax
C#Visual Basic
public sealed class IPGlobalProperties
Public NotInheritable Class IPGlobalProperties
Members
All MembersMethodsProperties



IconMemberDescription
DhcpScopeName
Gets the Dynamic Host Configuration Protocol (DHCP) scope name.

DomainName
Gets the domain in which the local computer is registered.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()
Serves as a hash function for a particular type. GetHashCode()()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
GetIcmpV4Statistics()()()
Provides Internet Control Message Protocol (ICMP) version 4 statistical data for the local computer.

GetIcmpV6Statistics()()()
Provides Internet Control Message Protocol (ICMP) version 6 statistical data for the local computer.

GetIPGlobalProperties()()()
Gets an object that provides information about the local computer's network connectivity and traffic statistics.

GetIPv4GlobalStatistics()()()
Provides Internet Protocol version 4 (IPv4) statistical data for the local computer.

GetIPv6GlobalStatistics()()()
Provides Internet Protocol version 6 (IPv6) statistical data for the local computer.

GetTcpIPv4Statistics()()()
Provides Transmission Control Protocol/Internet Protocol version 4 (TCP/IPv4) statistical data for the local computer.

GetTcpIPv6Statistics()()()
Provides Transmission Control Protocol/Internet Protocol version 6 (TCP/IPv6) statistical data for the local computer.

GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
GetUdpIPv4Statistics()()()
Provides User Datagram Protocol/Internet Protocol version 4 (UDP/IPv4) statistical data for the local computer.

GetUdpIPv6Statistics()()()
Provides User Datagram Protocol/Internet Protocol version 6 (UDP/IPv6) statistical data for the local computer.

HostName
Gets the host name for the local computer.

IsWinsProxy
Gets a Boolean value that specifies whether the local computer is acting as a Windows Internet Name Service (WINS) proxy.

MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
NodeType
Gets the Network Basic Input/Output System (NetBIOS) node type of the local computer.

ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Remarks
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.

Examples
The following code example displays information about the local computer using an instance of this class.
CopyC#
[Visual Basic]
            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
CopyC#
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);   
}
Inheritance Hierarchy
Object
IPGlobalProperties
See Also
[!:System.Net.NetworkInformation.IPGlobalProperties]

Assembly: InTheHand.Net (Module: InTheHand.Net) Version: 2.1.0.0