Click or drag to resize

EndianBitConverter Class

BitConverter assumes that the byte arrays given to it are always in the system's native byte order. If you want to convert bytes that come from a file that is always in the same byte order regardless of the system's endianness, this class will do the byte reordering for you.
Inheritance Hierarchy
SystemObject
  AGI.Foundation.InfrastructureEndianBitConverter

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 19.5.402.0 (19.5.402.0)
Syntax
public class EndianBitConverter

The EndianBitConverter type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberBigEndian
Gets an EndianBitConverter that assumes all bytes are in Big Endian byte order.
Public propertyStatic memberLittleEndian
Gets an EndianBitConverter that assumes all bytes are in Little Endian byte order.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBytes(Double)
Returns the specified double-precision floating point value as an array of bytes.
Public methodGetBytes(Int16)
Returns the specified 16-bit signed integer value as an array of bytes.
Public methodGetBytes(Int32)
Returns the specified 32-bit signed integer value as an array of bytes.
Public methodGetBytes(Int64)
Returns the specified 64-bit signed integer value as an array of bytes.
Public methodGetBytes(Single)
Returns the specified single-precision floating point value as an array of bytes.
Public methodGetBytes(UInt16)
Returns the specified 16-bit unsigned integer value as an array of bytes.
Public methodGetBytes(UInt32)
Returns the specified 32-bit unsigned integer value as an array of bytes.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToDouble
Returns a double-precision floating point number converted from eight bytes at a specified position in a byte array.
Public methodToInt16
Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array.
Public methodToInt32
Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.
Public methodToInt64
Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.
Public methodToSingle
Returns a single-precision floating point number converted from four bytes at a specified position in a byte array.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodToUInt16
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array.
Public methodToUInt32
Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.
Top
See Also