Mono Class Library: System.IO.FileStream Overview | Members

System.IO.FileStream.Length Property

Gets the length in bytes of the stream.

public override long Length { get; }

Value

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

Exceptions

TypeReason
NotSupportedExceptionFileStream.CanSeek for this stream is false.
System.IO.IOExceptionAn I/O error occurred, such as the file being closed.

Remarks

This property is read-only.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0