共用方式為


MulticastOption.Group 屬性

定義

取得或設定多點傳送群組的 IP 位址。

public:
 property System::Net::IPAddress ^ Group { System::Net::IPAddress ^ get(); void set(System::Net::IPAddress ^ value); };
public System.Net.IPAddress Group { get; set; }
member this.Group : System.Net.IPAddress with get, set
Public Property Group As IPAddress

屬性值

多播群組的IP位址。

例外狀況

.NET 5 和更新版本: groupnull

範例

下列範例會顯示這個屬性的值。

static void MulticastOptionProperties()
{
   Console::WriteLine( "Current multicast group is: {0}", mcastOption->Group );
   Console::WriteLine( "Current multicast local address is: {0}", mcastOption->LocalAddress );
}
private static void MulticastOptionProperties()
{
    Console.WriteLine("Current multicast group is: " + s_mcastOption.Group);
    Console.WriteLine("Current multicast local address is: " + s_mcastOption.LocalAddress);
}
Private Shared Sub MulticastOptionProperties()
  Console.WriteLine(("Current multicast group is: " + mcastOption.Group.ToString()))
  Console.WriteLine(("Current multicast local address is: " + mcastOption.LocalAddress.ToString()))
End Sub

備註

多播封包的有效IP位址介於224.0.0.0.0到239.255.255.255。

適用於