共用方式為


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

屬性值

String 執行個體,包含電腦的 DHCP 範圍名稱。

屬性

例外狀況

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 範圍是位於相同子網上之網路計算機的系統管理群組。

適用於