IPInterfacePropertiesとは? わかりやすく解説

IPInterfaceProperties クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

インターネット プロトコル Version 4 (IPv4) またはインターネット プロトコル Version 6 (IPv6) をサポートしているネットワーク インターフェイスに関する情報を提供します。

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

Public MustInherit Class
 IPInterfaceProperties
Dim instance As IPInterfaceProperties
public abstract class IPInterfaceProperties
public ref class IPInterfaceProperties abstract
public abstract class IPInterfaceProperties
public abstract class IPInterfaceProperties
解説解説
使用例使用例

アドレス情報を表示するコード例を次に示します。

public static void ShowIPAddresses(IPInterfaceProperties
 adapterProperties)
{
    IPAddressCollection dnsServers = adapterProperties.DnsAddresses;
    if (dnsServers != null)
    {
        foreach (IPAddress dns in dnsServers)
        {
            Console.WriteLine("  DNS Servers ............................. :
 {0}", 
                dns.ToString()
           );
        }
    }
    IPAddressInformationCollection anyCast = adapterProperties.AnycastAddresses;
    if (anyCast != null)
    {
        foreach (IPAddressInformation any in
 anyCast)
        {
            Console.WriteLine("  Anycast Address ..........................
 : {0} {1} {2}", 
                any.Address,
                any.IsTransient ? "Transient" : "", 
                any.IsDnsEligible ? "DNS Eligible" : ""
            );
        }
        Console.WriteLine();
    }
        
    MulticastIPAddressInformationCollection multiCast = adapterProperties.MulticastAddresses;
    if (multiCast != null)
    {
        foreach (IPAddressInformation multi in
 multiCast)
        {
            Console.WriteLine("  Multicast Address ....................... :
 {0} {1} {2}", 
                multi.Address,
                multi.IsTransient ? "Transient" : "", 
                multi.IsDnsEligible ? "DNS Eligible" : ""
            );
        }
        Console.WriteLine();
    }
    UnicastIPAddressInformationCollection uniCast = adapterProperties.UnicastAddresses;
    if (uniCast != null)
    {
        string lifeTimeFormat = "dddd, MMMM dd, yyyy  hh:mm:ss
 tt";
        foreach (UnicastIPAddressInformation uni in
 uniCast)
        {
            DateTime when;
            
            Console.WriteLine("  Unicast Address ......................... :
 {0}", uni.Address);
            Console.WriteLine("     Prefix Origin ........................ :
 {0}", uni.PrefixOrigin);
            Console.WriteLine("     Suffix Origin ........................ :
 {0}", uni.SuffixOrigin);
            Console.WriteLine("     Duplicate Address Detection .......... :
 {0}", 
                uni.DuplicateAddressDetectionState);
                
            // Format the lifetimes as Sunday, February 16, 2003 11:33:44
 PM
            // if en-us is the current culture.
            
            // Calculate the date and time at the end of the lifetimes.
    
            when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.AddressValidLifetime);
            when = when.ToLocalTime();    
            Console.WriteLine("     Valid Life Time ...................... :
 {0}", 
                when.ToString(lifeTimeFormat,System.Globalization.CultureInfo.CurrentCulture)
            );
            when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.AddressPreferredLifetime);
   
            when = when.ToLocalTime();      
            Console.WriteLine("     Preferred life time .................. :
 {0}", 
                when.ToString(lifeTimeFormat,System.Globalization.CultureInfo.CurrentCulture)
            ); 
            
            when = DateTime.UtcNow + TimeSpan.FromSeconds(uni.DhcpLeaseLifetime);
            when = when.ToLocalTime(); 
            Console.WriteLine("     DHCP Leased Life Time ................ :
 {0}", 
                when.ToString(lifeTimeFormat,System.Globalization.CultureInfo.CurrentCulture)
            );
        }
        Console.WriteLine();
    }
}
継承階層継承階層
System.Object
  System.Net.NetworkInformation.IPInterfaceProperties
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IPInterfaceProperties メンバ
System.Net.NetworkInformation 名前空間

IPInterfaceProperties コンストラクタ


IPInterfaceProperties プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ AnycastAddresses このインターフェイスに割り当てられているエニーキャスト IP アドレスを取得します。
パブリック プロパティ DhcpServerAddresses このインターフェイスの DHCP (Dynamic Host Configuration Protocol) サーバーのアドレスを取得します。
パブリック プロパティ DnsAddresses このインターフェイスのドメイン ネーム システム (DNS) サーバーのアドレスを取得します。
パブリック プロパティ DnsSuffix このインターフェイスに関連付けられているドメイン ネーム システム (DNS) サフィックスを取得します。
パブリック プロパティ GatewayAddresses このインターフェイスのネットワーク ゲートウェイのアドレスを取得します。
パブリック プロパティ IsDnsEnabled このインターフェイスがドメイン ネーム システム (DNS) サーバーに名前解決のクエリを送信するように構成されているかどうかを示す Boolean 値を取得します。
パブリック プロパティ IsDynamicDnsEnabled このインターフェイスがドメイン ネーム システム (DNS) を使用して自動的に IP アドレス情報を登録するように構成されているかどうかを示す Boolean 値を取得します。
パブリック プロパティ MulticastAddresses このインターフェイスに割り当てられているマルチキャスト アドレスを取得します。
パブリック プロパティ UnicastAddresses このインターフェイスに割り当てられているユニキャスト アドレスを取得します。
パブリック プロパティ WinsServersAddresses WINS (Windows Internet Name Service) サーバーのアドレスを取得します。
参照参照

関連項目

IPInterfaceProperties クラス
System.Net.NetworkInformation 名前空間

IPInterfaceProperties メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

IPInterfaceProperties クラス
System.Net.NetworkInformation 名前空間

IPInterfaceProperties メンバ

インターネット プロトコル Version 4 (IPv4) またはインターネット プロトコル Version 6 (IPv6) をサポートしているネットワーク インターフェイスに関する情報を提供します。

IPInterfaceProperties データ型で公開されるメンバを以下の表に示します。


プロテクト コンストラクタプロテクト コンストラクタ
  名前 説明
プロテクト メソッド IPInterfaceProperties IPInterfaceProperties クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ AnycastAddresses このインターフェイスに割り当てられているエニーキャスト IP アドレスを取得します。
パブリック プロパティ DhcpServerAddresses このインターフェイスの DHCP (Dynamic Host Configuration Protocol) サーバーのアドレスを取得します。
パブリック プロパティ DnsAddresses このインターフェイスのドメイン ネーム システム (DNS) サーバーのアドレスを取得します。
パブリック プロパティ DnsSuffix このインターフェイスに関連付けられているドメイン ネーム システム (DNS) サフィックスを取得します。
パブリック プロパティ GatewayAddresses このインターフェイスのネットワーク ゲートウェイのアドレスを取得します。
パブリック プロパティ IsDnsEnabled このインターフェイスがドメイン ネーム システム (DNS) サーバーに名前解決のクエリを送信するように構成されているかどうかを示す Boolean 値を取得します。
パブリック プロパティ IsDynamicDnsEnabled このインターフェイスがドメイン ネーム システム (DNS) を使用して自動的に IP アドレス情報を登録するように構成されているかどうかを示す Boolean 値を取得します。
パブリック プロパティ MulticastAddresses このインターフェイスに割り当てられているマルチキャスト アドレスを取得します。
パブリック プロパティ UnicastAddresses このインターフェイスに割り当てられているユニキャスト アドレスを取得します。
パブリック プロパティ WinsServersAddresses WINS (Windows Internet Name Service) サーバーのアドレスを取得します。
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

IPInterfaceProperties クラス
System.Net.NetworkInformation 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「IPInterfaceProperties」の関連用語

IPInterfacePropertiesのお隣キーワード
検索ランキング

   

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



IPInterfacePropertiesのページの著作権

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

©2026 GRAS Group, Inc.RSS