MulticastOption::LocalAddress Property

 

Gets or sets the local address associated with a multicast group.

Namespace:   System.Net.Sockets
Assembly:  System (in System.dll)

public:
property IPAddress^ LocalAddress {
	IPAddress^ get();
	void set(IPAddress^ value);
}

Property Value

Type: System.Net::IPAddress^

An IPAddress that contains the local address associated with a multicast group.

The LocalAddress property contains the IP address of the interface associated with the multicast group membership. If LocalAddress is set to Any, the default interface is used.

The following example displays the value of this property.

static void MulticastOptionProperties()
{
   Console::WriteLine( "Current multicast group is: {0}", mcastOption->Group );
   Console::WriteLine( "Current multicast local address is: {0}", mcastOption->LocalAddress );
}


.NET Framework
Available since 1.1
Return to top
Show: