SqlBinary.Length Property


Gets the length in bytes of the Value property. This property is read-only.

Namespace:   System.Data.SqlTypes
Assembly:  System.Data (in System.Data.dll)

public int Length { get; }

Property Value

Type: System.Int32

The length of the binary data in the Value property.

Exception Condition

The Length property is read when the Value property contains Null.

To avoid raising a SqlNullValueException, always examine the IsNull property before reading the Length property.

.NET Framework
Available since 1.1
Return to top