When overridden in a derived class, gets the length in bytes of the stream.

Namespace: Contracts
Assembly: Contracts (in Contracts.dll)

Public ReadOnly Overrides Property Length() As Long
This language is not supported or no code example is available.
public override long Length {get;}
This language is not supported or no code example is available.
public:  
property long Length { 
long get( ); 
}
This language is not supported or no code example is available.
public function get Length() : long;
This language is not supported or no code example is available.

Property Value

Type: long

A long value representing the length of the stream in bytes.

Exception type Condition

NotSupportedException

A class derived from Stream does not support seeking.

ObjectDisposedException

Methods were called after the stream was closed.

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1