Method HostTo
HostTo(ByteOrder, Int16)
Converts the byte-order of the provided value from host byte-order to the requested byte-order.
Declaration
public static short HostTo(ByteOrder order, short value)
Parameters
| Type |
Name |
Description |
| ByteOrder |
order |
Requested byte-order to convert value to. |
| Int16 |
value |
The value to convert in host byte-order. |
Returns
| Type |
Description |
| Int16 |
Value converted to the requested byte-order. |
HostTo(ByteOrder, UInt16)
Converts the byte-order of the provided value from host byte-order to the requested byte-order.
Declaration
public static ushort HostTo(ByteOrder order, ushort value)
Parameters
| Type |
Name |
Description |
| ByteOrder |
order |
Requested byte-order to convert value to. |
| UInt16 |
value |
The value to convert in host byte-order. |
Returns
| Type |
Description |
| UInt16 |
Value converted to the requested byte-order. |
HostTo(ByteOrder, Int32)
Converts the byte-order of the provided value from host byte-order to the requested byte-order.
Declaration
public static int HostTo(ByteOrder order, int value)
Parameters
| Type |
Name |
Description |
| ByteOrder |
order |
Requested byte-order to convert value to. |
| Int32 |
value |
The value to convert in host byte-order. |
Returns
| Type |
Description |
| Int32 |
Value converted to the requested byte-order. |
HostTo(ByteOrder, UInt32)
Converts the byte-order of the provided value from host byte-order to the requested byte-order.
Declaration
public static uint HostTo(ByteOrder order, uint value)
Parameters
| Type |
Name |
Description |
| ByteOrder |
order |
Requested byte-order to convert value to. |
| UInt32 |
value |
The value to convert in host byte-order. |
Returns
| Type |
Description |
| UInt32 |
Value converted to the requested byte-order. |
HostTo(ByteOrder, Int64)
Converts the byte-order of the provided value from host byte-order to the requested byte-order.
Declaration
public static long HostTo(ByteOrder order, long value)
Parameters
| Type |
Name |
Description |
| ByteOrder |
order |
Requested byte-order to convert value to. |
| Int64 |
value |
The value to convert in host byte-order. |
Returns
| Type |
Description |
| Int64 |
Value converted to the requested byte-order. |
HostTo(ByteOrder, UInt64)
Converts the byte-order of the provided value from host byte-order to the requested byte-order.
Declaration
public static ulong HostTo(ByteOrder order, ulong value)
Parameters
| Type |
Name |
Description |
| ByteOrder |
order |
Requested byte-order to convert value to. |
| UInt64 |
value |
The value to convert in host byte-order. |
Returns
| Type |
Description |
| UInt64 |
Value converted to the requested byte-order. |