SocketAddress.Item Property

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

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


Public Property Item ( _
    offset As Integer _
) As Byte
public byte this[
    int offset
] { get; set; }


  • offset
    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 (the offset is. less than 0 or greater than or equal to the Size property).


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


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

Version Information


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1


For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.