TnefReaderReadValueAsString Method

Read the current attribute's value as a string.

Definition

Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public string ReadValueAsString(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

String
The value.

Remarks

Reads the current attribute's value as a string, decoded using the current Codepage.

The value may only be read once.

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 string.

-or-

The attribute's value has already been read.

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

See Also