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

C# | Visual Basic | Visual C++ | J# |
public override long Length { get; }
Public Overrides ReadOnly Property Length As Long Get
public: virtual property long long Length { long long get () override; }
/** @property */ public long get_Length()

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

Exception | Condition |
---|---|
NotSupportedException | A class derived from Stream does not support seeking.
|
ObjectDisposedException | Methods were called after the stream was closed.
|