MulticastOption.LocalAddress 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定與多點傳送群組相關的本機位址。
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
屬性值
與多播群組相關聯的本機位址。
範例
下列範例會顯示這個屬性的值。
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
備註
屬性 LocalAddress 包含與多播群組成員資格相關聯的介面 IP 位址。 如果 LocalAddress 設定為 Any,則會使用預設介面。