Class ByteOrderMark
Use this class to evaluate arbitrary byte arrays for the presence of a Byte Order Mark.
Inheritance
Inherited Members
Namespace: WizardWrx
Assembly: WizardWrx.Common.dll
Syntax
public class ByteOrderMark
Constructors
| Improve this Doc View SourceByteOrderMark(Byte[])
The only public constructor demands a reference to the byte array to evaluate.
Declaration
public ByteOrderMark(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | Supply a reference to the byte array to test for a Byte Order Mark. |
Properties
| Improve this Doc View SourceKind
This read-only property returns the type of Byte Order Mark present in the byte array that was supplied to the constructor.
Declaration
public ByteOrderMark.BOMType Kind { get; }
Property Value
Type | Description |
---|---|
ByteOrderMark.BOMType |
Length
This read-only property returns the length of the Byte Order Mark.
Declaration
public int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
Since the property is initialized on first use, it may display an invalid value of -1 in a watch window.
Methods
| Improve this Doc View SourceTestForBOM()
If it hasn't been directly called, the first call to either property getter calls this method, so that the work required to evaluate the array for a byte order mark is deferred until it is needed, and it is never subsequently repeated for the lifetime of the instance.
Declaration
public void TestForBOM()