Struct Endian
- Namespace
- FellowOakDicom.IO
- Assembly
- fo-dicom.core.dll
Representation and convenience methods associated with endianness.
public struct Endian
- Inherited Members
- Extension Methods
Fields
Big
Big endian.
public static readonly Endian Big
Field Value
Little
Little endian.
public static readonly Endian Little
Field Value
LocalMachine
Endianness of the local machine, according to IsLittleEndian.
public static readonly Endian LocalMachine
Field Value
Network
Network endian (big).
public static readonly Endian Network
Field Value
Methods
Equals(object)
public override bool Equals(object obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
Swap(double)
Swap byte order in double value.
public static double Swap(double value)
Parameters
value
doubleValue in which bytes should be swapped.
Returns
- double
Byte order swapped value.
Swap(short)
Swap byte order in short value.
public static short Swap(short value)
Parameters
value
shortValue in which bytes should be swapped.
Returns
- short
Byte order swapped value.
Swap(short[])
Swap byte order in array of short values.
public static void Swap(short[] values)
Parameters
Swap(int)
Swap byte order in int value.
public static int Swap(int value)
Parameters
value
intValue in which bytes should be swapped.
Returns
- int
Byte order swapped value.
Swap(int[])
Swap byte order in array of int values.
public static void Swap(int[] values)
Parameters
Swap(long)
Swap byte order in long value.
public static long Swap(long value)
Parameters
value
longValue in which bytes should be swapped.
Returns
- long
Byte order swapped value.
Swap(float)
Swap byte order in float value.
public static float Swap(float value)
Parameters
value
floatValue in which bytes should be swapped.
Returns
- float
Byte order swapped value.
Swap(ushort)
Swap byte order in ushort value.
public static ushort Swap(ushort value)
Parameters
value
ushortValue in which bytes should be swapped.
Returns
- ushort
Byte order swapped value.
Swap(ushort[])
Swap byte order in array of ushort values.
public static void Swap(ushort[] values)
Parameters
Swap(uint)
Swap byte order in uint value.
public static uint Swap(uint value)
Parameters
value
uintValue in which bytes should be swapped.
Returns
- uint
Byte order swapped value.
Swap(uint[])
Swap byte order in array of uint values.
public static void Swap(uint[] values)
Parameters
Swap(ulong)
Swap byte order in ulong value.
public static ulong Swap(ulong value)
Parameters
value
ulongValue in which bytes should be swapped.
Returns
- ulong
Byte order swapped value.
SwapBytes(int, byte[])
Swap bytes in sequences of bytesToSwap
.
public static void SwapBytes(int bytesToSwap, byte[] bytes)
Parameters
SwapBytes(int, byte[], int)
Swap bytes in sequences of bytesToSwap
.
public static void SwapBytes(int bytesToSwap, byte[] bytes, int count)
Parameters
bytesToSwap
intNumber of bytes to swap.
bytes
byte[]Array of bytes.
count
intThe maximum number of bytes in the array that should be processed
SwapBytes2(byte[])
Swap bytes in sequences of 2.
public static void SwapBytes2(byte[] bytes)
Parameters
bytes
byte[]Array of bytes.
SwapBytes2(byte[], int)
Swap bytes in sequences of 2.
public static void SwapBytes2(byte[] bytes, int count)
Parameters
bytes
byte[]Array of bytes.
count
intThe maximum number of bytes in the array that should be processed
SwapBytes4(byte[])
Swap bytes in sequences of 4.
public static void SwapBytes4(byte[] bytes)
Parameters
bytes
byte[]Array of bytes.
SwapBytes4(byte[], int)
Swap bytes in sequences of 4.
public static void SwapBytes4(byte[] bytes, int count)
Parameters
bytes
byte[]Array of bytes.
count
intThe maximum number of bytes in the array that should be processed
Swap<T>(T[])
Swap byte order in array of values.
public static void Swap<T>(T[] values)
Parameters
values
T[]Array of values to swap.
Type Parameters
Exceptions
ToString()
public override string ToString()
Returns
Operators
operator ==(Endian, Endian)
Endian equivalence operator.
public static bool operator ==(Endian e1, Endian e2)
Parameters
Returns
- bool
True if
e1
equalse2
, false otherwise.
operator !=(Endian, Endian)
Endian non-equivalence operator.
public static bool operator !=(Endian e1, Endian e2)
Parameters
Returns
- bool
True if
e1
does not equale2
, false otherwise.