EndianOptions Class
Definition
Configuration options for BitConverter.
public class EndianOptions : IParameterObject
- Inheritance
-
objectEndianOptions
- 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. |