Bagikan melalui


MulticastOption.Group Properti

Definisi

Mendapatkan atau mengatur alamat IP grup multicast.

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

Nilai Properti

Alamat IP grup multicast.

Pengecualian

.NET 5 dan versi yang lebih baru: group adalah null.

Contoh

Contoh berikut menampilkan nilai properti ini.

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

Keterangan

Alamat IP yang valid untuk paket multicast berada dalam rentang 224.0.0.0 hingga 239.255.255.255.

Berlaku untuk