Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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 long InterfaceIndex { get; set; }

Property Value

Type: System.Int64
A UInt64 value that specifies the address of the interface.

ExceptionCondition
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 = 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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft