PreambleSequence Enum
Definition
Specifies what action to take in regards to encoding preamble sequences.
public enum PreambleSequence
Fields
Keep = 0Any encoding preamble sequences will be preserved.
Remove = 1Any encoding preamble sequences will be removed.
Examples
The following example demonstrates how to use PreambleSequence with EncodingOptions to control whether byte order marks (BOM) are preserved or removed.
// Program.cs
using System;
using System.Text;
using Cuemon.Text;
var options = new EncodingOptions
{
Encoding = Encoding.UTF8,
Preamble = PreambleSequence.Keep
};
var preambleAction = options.Preamble;
var encoding = options.Encoding;
Console.WriteLine(preambleAction); // outputs: Keep