SocketAddress.Item[Int32] 屬性

定義

取得或設定基礎緩衝區中的指定索引項目。

public:
 property System::Byte default[int] { System::Byte get(int offset); void set(int offset, System::Byte value); };
public byte this[int offset] { get; set; }
member this.Item(int) : byte with get, set
Default Public Property Item(offset As Integer) As Byte

參數

offset
Int32

所需資訊的陣列索引項目

屬性值

基礎緩衝區中指定索引項目的值。

例外狀況

指定的索引不存在於緩衝區中

備註

這個屬性會取得或設定基礎緩衝區中指定的位元組位置。

注意

在參考基礎緩衝區中的專案之前,請務必先呼叫 Size 。 參考不存在的索引會導致 SocketAddress 擲回 IndexOutOfRangeException

適用於

另請參閱