SqlBinary.Item[Int32] 屬性

定義

從位於整數參數 index 所指示之位置的 Value 屬性中取得單一位元組。 如果 index 指示超過位元組陣列末端的位置,則會引發 SqlNullValueException。 這個屬性是唯讀的。

public:
 property System::Byte default[int] { System::Byte get(int index); };
public byte this[int index] { get; }
member this.Item(int) : byte
Default Public ReadOnly Property Item(index As Integer) As Byte

參數

index
Int32

要擷取的位元組位置。

屬性值

位元組,位於整數參數所指示的位置。

例外狀況

Value 屬性包含 Null 時讀取屬性。

-或-

index 參數指示超過位元組陣列長度的位置,如 Length 屬性所指示。

備註

若要避免引發 SqlNullValueException,請先檢查 IsNull 屬性和 屬性, Length 然後再讀取這個屬性。

適用於

另請參閱