Tnef WriterWrite Attribute(Tnef Attribute Tag, String) Method
Write an attribute with a string value.
Definition
Namespace: MimeKit.Tnef
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void WriteAttribute(
TnefAttributeTag tag,
string value
)Parameters
- tag TnefAttributeTag
- The attribute tag.
- value String
- The value.
Remarks
Writes an attribute with a string value, encoded using the Codepage and terminated by a nul character.
The value of an attribute with a String or Text type and the value of the MessageClass and OriginalMessageClass attributes may be written as a string. A message class must consist of between 1 and 254 printable ASCII characters.
Exceptions
| ArgumentNullException | value is . |
| ArgumentException |
tag is not an attribute that can be written. -or- The value of tag is not a string. -or- value is not a valid message class. |
| 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. |