SocketAddress.Item Property (Int32)


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

Gets or sets the specified index element in the underlying buffer.

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

public byte this[
	int offset
] { get; set; }


Type: System.Int32

The array index element of the desired information.

Property Value

Type: System.Byte

The value of the specified index element in the underlying buffer.

Exception Condition

The specified index does not exist in the buffer.

This property gets or sets the specified byte position in the underlying buffer.


Be sure to call Size before referring to elements in the underlying buffer. Referring to an index that does not exist will cause the SocketAddress to throw an IndexOutOfRangeException.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top