BoundedStreamLength Property

Get the length of the stream, in bytes.

Definition

Namespace: MimeKit.IO
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public override long Length { get; }

Property Value

Int64
The length of the stream in bytes.

Remarks

If the EndBoundary property is greater than or equal to 0, then the length will be calculated by subtracting the StartBoundary from the EndBoundary. If the end of the stream is unbound, then the StartBoundary will be subtracted from the length of the BaseStream.

Exceptions

NotSupportedException The stream does not support seeking.
ObjectDisposedException The stream has been disposed.

See Also