NetworkInterface.SupportsMulticast プロパティ

定義

ネットワーク インターフェイスがマルチキャスト パケットの受信を有効にするかどうかを示す Boolean 値を取得します。

public:
 abstract property bool SupportsMulticast { bool get(); };
public:
 virtual property bool SupportsMulticast { bool get(); };
public abstract bool SupportsMulticast { get; }
public virtual bool SupportsMulticast { get; }
member this.SupportsMulticast : bool
Public MustOverride ReadOnly Property SupportsMulticast As Boolean
Public Overridable ReadOnly Property SupportsMulticast As Boolean

プロパティ値

true インターフェイスがマルチキャスト パケットを受信する場合。それ以外の場合は false

例外

このプロパティは、Windows XPより前のオペレーティング システムを実行しているコンピューターでは無効です。

次のコード例では、ローカル コンピューター上のすべてのインターフェイスの概要を表示します。

public static void DisplayTypeAndAddress()
{
    IPGlobalProperties computerProperties = IPGlobalProperties.GetIPGlobalProperties();
    NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
    Console.WriteLine("Interface information for {0}.{1}     ",
            computerProperties.HostName, computerProperties.DomainName);
    foreach (NetworkInterface adapter in nics)
    {
        IPInterfaceProperties properties = adapter.GetIPProperties();
        Console.WriteLine(adapter.Description);
        Console.WriteLine(String.Empty.PadLeft(adapter.Description.Length,'='));
        Console.WriteLine("  Interface type .......................... : {0}", adapter.NetworkInterfaceType);
        Console.WriteLine("  Physical Address ........................ : {0}",
                   adapter.GetPhysicalAddress().ToString());
        Console.WriteLine("  Is receive only.......................... : {0}", adapter.IsReceiveOnly);
        Console.WriteLine("  Multicast................................ : {0}", adapter.SupportsMulticast);
        Console.WriteLine();
      }
   }
Public Shared Sub DisplayTypeAndAddress() 
    Dim computerProperties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
    Dim nics As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
    Console.WriteLine("Interface information for {0}.{1}     ", computerProperties.HostName, computerProperties.DomainName)
    Dim adapter As NetworkInterface
    For Each adapter In  nics
        Dim properties As IPInterfaceProperties = adapter.GetIPProperties()
        Console.WriteLine(adapter.Description)
        Console.WriteLine(String.Empty.PadLeft(adapter.Description.Length, "="c))
        Console.WriteLine("  Interface type .......................... : {0}", adapter.NetworkInterfaceType)
        Console.WriteLine("  Physical Address ........................ : {0}", adapter.GetPhysicalAddress().ToString())
        Console.WriteLine("  Is receive only.......................... : {0}", adapter.IsReceiveOnly)
        Console.WriteLine("  Multicast................................ : {0}", adapter.SupportsMulticast)
    Next adapter

End Sub

注釈

マルチキャストは、データ パケットを複数の宛先に同時に送信する動作です。

適用対象