TnefReaderReadValueAsInt32Async Method

Asynchronously read the current attribute's value as a 32-bit integer.

Definition

Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Task<int> ReadValueAsInt32Async(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskInt32
The value.

Remarks

Asynchronously reads the current attribute's value as a 32-bit integer.

The value may be read any number of times.

Exceptions

ObjectDisposedException The reader has been disposed.
InvalidOperationException

The reader is not positioned on an attribute.

-or-

The attribute's value cannot be read as a 32-bit integer.

-or-

The attribute's value has already been consumed in some other way.

OperationCanceledException The operation was canceled via the cancellation token.
IOException An I/O error occurred.

See Also