Tnef ReaderRead Value As Int 16Async Method
Asynchronously read the current attribute's value as a 16-bit integer.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
The value.
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public Task<short> ReadValueAsInt16Async(
CancellationToken cancellationToken = default
)Parameters
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskInt16The value.
Remarks
Asynchronously reads the current attribute's value as a 16-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 16-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. |