HeaderListInsert(Int32, HeaderId, Encoding, String) Method

Insert a header with the specified field and value at the given index.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public void Insert(
	int index,
	HeaderId id,
	Encoding encoding,
	string value
)

Parameters

index  Int32
The index to insert the header.
id  HeaderId
The header identifier.
encoding  Encoding
The character encoding to use for the value.
value  String
The header value.

Remarks

Inserts the header at the specified index in the list.

Exceptions

ArgumentNullException

encoding is .

-or-

value is .

ArgumentOutOfRangeException

id is not a valid HeaderId.

-or-

index is out of range.

See Also