Property | Type | Description | |
---|---|---|---|
IsLittleEndian | bool |
Method | Description | |
---|---|---|
GetBytes ( double value ) : byte[] |
Returns the specified double-precision floating point value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 8.
|
|
GetBytes ( float value ) : byte[] |
Returns the specified single-precision floating point value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 4.
|
|
GetBytes ( int value ) : byte[] |
Returns the specified 32-bit signed integer value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 4.
|
|
GetBytes ( long value ) : byte[] |
Returns the specified 64-bit signed integer value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 8.
|
|
GetBytes ( short value ) : byte[] |
Returns the specified 16-bit signed integer value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 2.
|
|
GetBytes ( uint value ) : byte[] |
Returns the specified 32-bit unsigned integer value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 4.
|
|
GetBytes ( ulong value ) : byte[] |
Returns the specified 64-bit unsigned integer value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 8.
|
|
GetBytes ( ushort value ) : byte[] |
Returns the specified 16-bit unsigned integer value as an array of bytes. Parameters: value: The number to convert. Returns: An array of bytes with length 2.
|
|
ToDouble ( byte value, int startIndex ) : double |
Returns a double-precision floating point number converted from eight bytes at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A double precision floating point number formed by eight bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex is greater than or equal to the length of value minus 7, and is less than or equal to the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToInt16 ( byte value, int startIndex ) : short |
Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A 16-bit signed integer formed by two bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex equals the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToInt32 ( byte value, int startIndex ) : int |
Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A 32-bit signed integer formed by four bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex is greater than or equal to the length of value minus 3, and is less than or equal to the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToInt64 ( byte value, int startIndex ) : long |
Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A 64-bit signed integer formed by eight bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex is greater than or equal to the length of value minus 7, and is less than or equal to the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToSingle ( byte value, int startIndex ) : float |
Returns a single-precision floating point number converted from four bytes at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A single-precision floating point number formed by four bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex is greater than or equal to the length of value minus 3, and is less than or equal to the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToUInt16 ( byte value, int startIndex ) : ushort |
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array. Parameters: value: The array of bytes. startIndex: The starting position within value. Returns: A 16-bit unsigned integer formed by two bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex equals the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToUInt32 ( byte value, int startIndex ) : uint |
Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A 32-bit unsigned integer formed by four bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex is greater than or equal to the length of value minus 3, and is less than or equal to the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToUInt64 ( byte value, int startIndex ) : ulong |
Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A 64-bit unsigned integer formed by the eight bytes beginning at startIndex. Exceptions: System.ArgumentException: startIndex is greater than or equal to the length of value minus 7, and is less than or equal to the length of value minus 1. System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
public static GetBytes ( double value ) : byte[] | ||
value | double | |
return | byte[] |
public static GetBytes ( float value ) : byte[] | ||
value | float | |
return | byte[] |
public static GetBytes ( int value ) : byte[] | ||
value | int | |
return | byte[] |
public static GetBytes ( long value ) : byte[] | ||
value | long | |
return | byte[] |
public static GetBytes ( short value ) : byte[] | ||
value | short | |
return | byte[] |
public static GetBytes ( uint value ) : byte[] | ||
value | uint | |
return | byte[] |
public static GetBytes ( ulong value ) : byte[] | ||
value | ulong | |
return | byte[] |
public static GetBytes ( ushort value ) : byte[] | ||
value | ushort | |
return | byte[] |
public static ToDouble ( byte value, int startIndex ) : double | ||
value | byte | |
startIndex | int | |
return | double |
public static ToInt16 ( byte value, int startIndex ) : short | ||
value | byte | |
startIndex | int | |
return | short |
public static ToInt32 ( byte value, int startIndex ) : int | ||
value | byte | |
startIndex | int | |
return | int |
public static ToInt64 ( byte value, int startIndex ) : long | ||
value | byte | |
startIndex | int | |
return | long |
public static ToSingle ( byte value, int startIndex ) : float | ||
value | byte | |
startIndex | int | |
return | float |
public static ToUInt16 ( byte value, int startIndex ) : ushort | ||
value | byte | |
startIndex | int | |
return | ushort |
public static ToUInt32 ( byte value, int startIndex ) : uint | ||
value | byte | |
startIndex | int | |
return | uint |
public static ToUInt64 ( byte value, int startIndex ) : ulong | ||
value | byte | |
startIndex | int | |
return | ulong |