Mono Class Library: System.Text.UTF8Encoding Overview | Members

System.Text.UTF8Encoding.GetPreamble Method

Returns the bytes used at the beginning of a stream to determine which encoding a file was created with.

public override byte[] GetPreamble ()

Returns

A byte array containing the UTF-8 encoding preamble.

Remarks

Note:

This method overrides Encoding.GetPreamble .

UTF8Encoding.GetPreamble returns the Unicode byte order mark (U+FEFF) written in UTF-8 (0xef, 0xbb, 0xbf) if this instance was constructed with a request to emit the UTF-8 identifier.

Requirements

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0