語言

IPGlobalProperties.DhcpScopeName 屬性

定義

取得動態主機設定協定(DHCP)範圍名稱。

public:
 abstract property System::String ^ DhcpScopeName { System::String ^ get(); };
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract string DhcpScopeName { get; }
public abstract string DhcpScopeName { get; }
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.DhcpScopeName : string
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);

備註

DHCP 範圍是同一子網上的網路電腦管理群組。

適用於