IPGlobalProperties.DhcpScopeName 属性

定义

获取动态主机配置协议 (DHCP) 范围名。

public:
 abstract property System::String ^ DhcpScopeName { System::String ^ get(); };
public abstract string DhcpScopeName { get; }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract string DhcpScopeName { get; }
member this.DhcpScopeName : string
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.DhcpScopeName : string
Public MustOverride ReadOnly Property DhcpScopeName As String

属性值

包含计算机的 DHCP 范围名称的 String 实例。

属性

例外

Win32 函数调用失败。

示例

下面的代码示例显示本地计算机的网络信息。

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);

注解

DHCP 作用域是同一子网上的网络计算机的管理分组。

适用于