IPv6MulticastOption.Group Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the IP address of a multicast group.

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

public IPAddress Group { get; set; }

Property Value

Type: System.Net.IPAddress

An IPAddress that contains the Internet address of a multicast group.

Exception Condition
ArgumentNullException

group is null.

The following example creates an IPv6MulticastOption object.

// Exercise the use of the IPv6MulticastOption.
Console.WriteLine("Instantiate IPv6MulticastOption(IPAddress)");

// Instantiate IPv6MulticastOption using one of the 
// overloaded constructors.
IPv6MulticastOption ipv6MulticastOption = new IPv6MulticastOption(m_GrpAddr);

// Store the IPAdress multicast options.
IPAddress group =  ipv6MulticastOption.Group;
long interfaceIndex = ipv6MulticastOption.InterfaceIndex;

// Display IPv6MulticastOption properties.
Console.WriteLine("IPv6MulticastOption.Group: [" + group  + "]");
Console.WriteLine("IPv6MulticastOption.InterfaceIndex: [" + interfaceIndex + "]");

.NET Framework
Available since 1.1
Return to top
Show: