IPv6MulticastOption Constructor (IPAddress^, Int64)
.NET Framework (current version)
Initializes a new instance of the IPv6MulticastOption class with the specified IP multicast group and the local interface address.
Assembly: System (in System.dll)
Parameters
- group
-
Type:
System.Net::IPAddress^
The group IPAddress.
- ifindex
-
Type:
System::Int64
The local interface address.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | ifindex is less than 0. -or- ifindex is greater than 0x00000000FFFFFFFF. |
| ArgumentNullException | group is null. |
The ifindex parameter specifies the interface on which data is received or sent.
The following example creates an IPv6MulticastOption object.
// Instantiate IPv6MulticastOption using another // overloaded constructor. IPv6MulticastOption^ ipv6MulticastOption2 = gcnew IPv6MulticastOption( group,interfaceIndex ); // Store the IPAdress multicast options. group = ipv6MulticastOption2->Group; interfaceIndex = ipv6MulticastOption2->InterfaceIndex; // Display the IPv6MulticastOption2 properties. Console::WriteLine( "IPv6MulticastOption::Group: [ {0} ]", group ); Console::WriteLine( "IPv6MulticastOption::InterfaceIndex: [ {0} ]", interfaceIndex ); // Join the specified multicast group using one of the // JoinMulticastGroup overloaded methods. clientOriginator->JoinMulticastGroup( (int)interfaceIndex, group );
.NET Framework
Available since 1.1
Available since 1.1
Show: