Show / Hide Table of Contents

Class ByteOrderMark

Use this class to evaluate arbitrary byte arrays for the presence of a Byte Order Mark.

Inheritance
System.Object
ByteOrderMark
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: WizardWrx
Assembly: WizardWrx.Common.dll
Syntax
public class ByteOrderMark

Constructors

| Improve this Doc View Source

ByteOrderMark(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 Source

Kind

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
| Improve this Doc View Source

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 Source

TestForBOM()

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()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX