Stream.Length Property

July 28, 2014

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

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public MustOverride ReadOnly Property Length As Long

Property Value

Type: System.Int64
A long value representing the length of the stream in bytes.

ExceptionCondition
NotSupportedException

A class derived from Stream does not support seeking.

ObjectDisposedException

Methods were called after the stream was closed.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft