SqlBinary.Length 屬性

定義

取得 Value 屬性的長度,以位元組為單位。 這個屬性是唯讀的。

public:
 property int Length { int get(); };
public int Length { get; }
member this.Length : int
Public ReadOnly Property Length As Integer

屬性值

Value 屬性中二進位資料的長度。

例外狀況

Length 屬性包含 Value 時,就會讀取 Null 屬性。

備註

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

適用於

另請參閱