.NET Framework Class Library
IPGlobalPropertiesGetIPGlobalProperties Method

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

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)
Syntax
Public Shared Function GetIPGlobalProperties As [%$TOPIC/7c7239a3_en-us_VS_110_1_0_0_0_0%]
public static [%$TOPIC/7c7239a3_en-us_VS_110_1_0_1_0_0%] GetIPGlobalProperties()
public:
static [%$TOPIC/7c7239a3_en-us_VS_110_1_0_2_0_0%]^ GetIPGlobalProperties()
static member GetIPGlobalProperties : unit -> [%$TOPIC/7c7239a3_en-us_VS_110_1_0_3_0_0%]
public static function GetIPGlobalProperties() : [%$TOPIC/7c7239a3_en-us_VS_110_1_0_4_0_0%]

Return Value

Type: System.Net.NetworkInformationIPGlobalProperties
A IPGlobalProperties object that contains information about the local computer.
Remarks

The object returned by this method is a system-supplied type that derives from the IPGlobalProperties class.

Examples

The following code example displays information about the local computer.

IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
Console.WriteLine("Computer name: {0}", properties.HostName);
Console.WriteLine("Domain name:   {0}", properties.DomainName);
Console.WriteLine("Node type:     {0:f}", properties.NodeType);
Console.WriteLine("DHCP scope:    {0}", properties.DhcpScopeName);
Console.WriteLine("WINS proxy?    {0}", properties.IsWinsProxy);
IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
Console::WriteLine( "Computer name: {0}", properties->HostName );
Console::WriteLine( "Domain name:   {0}", properties->DomainName );
Console::WriteLine( "Node type:     {0:f}", properties->NodeType );
Console::WriteLine( "DHCP scope:    {0}", properties->DhcpScopeName );
Console::WriteLine( "WINS proxy?    {0}", properties->IsWinsProxy );
Version Information

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
.NET Framework Security