Table of Contents

EndianOptions Class

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/EndianOptions.cs

Configuration options for BitConverter.

public class EndianOptions : IParameterObject
Inheritance
object
EndianOptions
Implements
Derived

Examples

The following example demonstrates how to configure EndianOptions to explicitly set the byte order for binary data operations.

using System;
using Cuemon;

namespace MyApp.Examples;

public class EndianOptionsExample
{
    public void Demonstrate()
    {
        var options = new EndianOptions
        {
            ByteOrder = Endianness.BigEndian
        };

        var byteOrder = options.ByteOrder;
        var isSystemLittleEndian = BitConverter.IsLittleEndian;

        Console.WriteLine($"Configured byte order: {byteOrder}");
        Console.WriteLine($"System is little-endian: {isSystemLittleEndian}");

}
}

Constructors

Name Description
EndianOptions()

Initializes a new instance of the EndianOptions class.

Properties

Name Description
ByteOrder

Gets or sets the endian byte order enumeration.

See Also