IPv6MulticastOption Constructor (IPAddress^)

 

Initializes a new version of the IPv6MulticastOption class for the specified IP multicast group.

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

public:
IPv6MulticastOption(
	IPAddress^ group
)

Parameters

group
Type: System.Net::IPAddress^

The IPAddress of the 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 = gcnew IPv6MulticastOption( m_GrpAddr );

// Store the IPAdress multicast options.
IPAddress^ group = ipv6MulticastOption->Group;
__int64 interfaceIndex = ipv6MulticastOption->InterfaceIndex;

// Display IPv6MulticastOption properties.
Console::WriteLine( "IPv6MulticastOption::Group: [ {0}]", group );
Console::WriteLine( "IPv6MulticastOption::InterfaceIndex: [ {0}]", interfaceIndex );

.NET Framework
Available since 1.1
Return to top
Show: