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

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

IPInterfaceProperties.GatewayAddresses プロパティ

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

このインターフェイスネットワーク ゲートウェイアドレス取得します

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

Public MustOverride ReadOnly
 Property GatewayAddresses As GatewayIPAddressInformationCollection
Dim instance As IPInterfaceProperties
Dim value As GatewayIPAddressInformationCollection

value = instance.GatewayAddresses
public abstract GatewayIPAddressInformationCollection GatewayAddresses
 { get; }
public:
virtual property GatewayIPAddressInformationCollection^ GatewayAddresses {
    GatewayIPAddressInformationCollection^ get () abstract;
}
/** @property */
public abstract GatewayIPAddressInformationCollection get_GatewayAddresses
 ()
public abstract function get
 GatewayAddresses () : GatewayIPAddressInformationCollection

プロパティ
ネットワーク ゲートウェイアドレス情報格納している IPAddressCollection。ゲートウェイが見つからない場合は空の配列

解説解説
使用例使用例

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

Public Shared Sub DisplayGatewayAddresses()
 
    Console.WriteLine("Gateways")
    Dim adapters As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
    Dim adapter As NetworkInterface
    For Each adapter In
  adapters
        Dim adapterProperties As IPInterfaceProperties
 = adapter.GetIPProperties()
        Dim addresses As GatewayIPAddressInformationCollection
 = adapterProperties.GatewayAddresses
        If addresses.Count > 0 Then
            Console.WriteLine(adapter.Description)
            Dim address As GatewayIPAddressInformation
            For Each address In
  addresses
                Console.WriteLine("  Gateway Address .........................
 : {0}", address.ToString())
            Next address
            Console.WriteLine()
        End If
    Next adapter

End Sub 'DisplayGatewayAddresses

public static void DisplayGatewayAddresses()
{
    Console.WriteLine("Gateways");
    NetworkInterface[] adapters  = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in adapters)
    {
        IPInterfaceProperties adapterProperties = adapter.GetIPProperties();
        GatewayIPAddressInformationCollection addresses = adapterProperties.GatewayAddresses;
        if (addresses.Count >0)
        {
            Console.WriteLine(adapter.Description);
            foreach (GatewayIPAddressInformation address in
 addresses)
            {
                Console.WriteLine("  Gateway Address .........................
 : {0}", 
                    address.ToString());
            }
            Console.WriteLine();
        }
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IPInterfaceProperties クラス
IPInterfaceProperties メンバ
System.Net.NetworkInformation 名前空間


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS