Bagikan melalui


MulticastOption.LocalAddress Properti

Definisi

Mendapatkan atau mengatur alamat lokal yang terkait dengan grup multicast.

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

Nilai Properti

Alamat lokal yang terkait dengan grup multicast.

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

Properti LocalAddress berisi alamat IP antarmuka yang terkait dengan keanggotaan grup multicast. Jika LocalAddress diatur ke Any, antarmuka default digunakan.

Berlaku untuk