LocalAddress Property
Collapse the table of content
Expand the table of content

MulticastOption.LocalAddress Property


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

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

public IPAddress LocalAddress { get; set; }

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.

private static void MulticastOptionProperties()
  Console.WriteLine("Current multicast group is: " + mcastOption.Group);
  Console.WriteLine("Current multicast local address is: " + mcastOption.LocalAddress);

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft