TnefWriterWriteAttribute(TnefAttributeTag, Int32) Method

Write an attribute with an integer value.

Definition

Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void WriteAttribute(
	TnefAttributeTag tag,
	int value
)

Parameters

tag  TnefAttributeTag
The attribute tag.
value  Int32
The value.

Remarks

Writes an attribute with an integer value.

The value of an attribute with a Short or Word type is written as a 16-bit integer and the value of an attribute with a Long or DWord type is written as a 32-bit integer.

Exceptions

ArgumentException

tag is not an attribute that can be written.

-or-

The value of tag is not an integer.

ArgumentOutOfRangeException value does not fit in a 16-bit attribute value.
ObjectDisposedException The writer has been disposed.
InvalidOperationException

The attribute cannot be written at this point in the stream.

-or-

The stream or property writer for the previous attribute has not been disposed.

IOException An I/O error occurred.

See Also