IPv6MulticastOption::InterfaceIndex Property

 

Gets or sets the interface index that is associated with a multicast group.

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

public:
property long long InterfaceIndex {
	long long get();
	void set(long long value);
}

Property Value

Type: System::Int64

A UInt64 value that specifies the address of the interface.

Exception Condition
ArgumentOutOfRangeException

The value that is specified for a set operation is less than 0 or greater than 0x00000000FFFFFFFF.

This property specifies the interface on which data is received or sent.

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: