IPInterfaceProperties.DhcpServerAddresses プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > IPInterfaceProperties.DhcpServerAddresses プロパティの意味・解説 

IPInterfaceProperties.DhcpServerAddresses プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

このインターフェイスDHCP (Dynamic Host Configuration Protocol) サーバーアドレス取得します

名前空間: System.Net.NetworkInformation
アセンブリ: System (system.dll 内)
構文構文

Public MustOverride ReadOnly
 Property DhcpServerAddresses As IPAddressCollection
Dim instance As IPInterfaceProperties
Dim value As IPAddressCollection

value = instance.DhcpServerAddresses
public abstract IPAddressCollection DhcpServerAddresses { get;
 }
public:
virtual property IPAddressCollection^ DhcpServerAddresses {
    IPAddressCollection^ get () abstract;
}
/** @property */
public abstract IPAddressCollection get_DhcpServerAddresses ()
public abstract function get
 DhcpServerAddresses () : IPAddressCollection

プロパティ
DHCP サーバーアドレス情報格納している IPAddressCollection。DHCP サーバーが見つからない場合は空の配列

解説解説
使用例使用例

ローカル コンピュータ上のネットワーク インターフェイスについて、DHCP アドレス情報表示するコード例次に示します

Public Shared Sub DisplayDhcpServerAddresses()
 
    Console.WriteLine("DHCP Servers")
    Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
    Dim adapter As NetworkInterface
    For Each adapter In
  adapters
        
        Dim adapterProperties As IPInterfaceProperties
 = adapter.GetIPProperties()
        Dim addresses As IPAddressCollection
 = adapterProperties.DhcpServerAddresses
        If addresses.Count > 0 Then
            Console.WriteLine(adapter.Description)
            Dim address As IPAddress
            For Each address In
  addresses
                Console.WriteLine("  Dhcp Address ............................
 : {0}", address.ToString())
            Next address
            Console.WriteLine()
        End If
    Next adapter

End Sub 'DisplayDhcpServerAddresses

public static void DisplayDhcpServerAddresses()
{
    Console.WriteLine("DHCP Servers");
    NetworkInterface[] adapters  = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in adapters)
    {

        IPInterfaceProperties adapterProperties = adapter.GetIPProperties();
        IPAddressCollection addresses = adapterProperties.DhcpServerAddresses;
        if (addresses.Count >0)
        {
            Console.WriteLine(adapter.Description);
            foreach (IPAddress address in addresses)
            {
                Console.WriteLine("  Dhcp Address ............................
 : {0}", 
                    address.ToString());
            }
            Console.WriteLine();
        }
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IPInterfaceProperties クラス
IPInterfaceProperties メンバ
System.Net.NetworkInformation 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からIPInterfaceProperties.DhcpServerAddresses プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からIPInterfaceProperties.DhcpServerAddresses プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からIPInterfaceProperties.DhcpServerAddresses プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

IPInterfaceProperties.DhcpServerAddresses プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



IPInterfaceProperties.DhcpServerAddresses プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS