Method | Description | |
---|---|---|
GetBytes ( bool value ) : byte[] |
Returns the specified Boolean value as an array of bytes. Parameters: value: A Boolean value. Returns: An array of bytes with length 1.
|
|
GetBytes ( char value ) : byte[] |
Returns the specified Unicode character value as an array of bytes. Parameters: value: A character to convert. Returns: An array of bytes with length 2.
|
|
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.
|
|
ToBoolean ( byte value, int startIndex ) : bool |
Returns a Boolean value converted from one byte at a specified position in a byte array. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: true if the byte at startIndex in value is nonzero; otherwise, false. Exceptions: System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToChar ( byte value, int startIndex ) : char |
Returns a Unicode character converted from two bytes at a specified position in a byte array. Parameters: value: An array. startIndex: The starting position within value. Returns: A character 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.
|
|
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.
|
|
ToString ( byte value ) : string |
Converts the numeric value of each element of a specified array of bytes to its equivalent hexadecimal string representation. Parameters: value: An array of bytes. Returns: A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in value; for example, "7F-2C-4A". Exceptions: System.ArgumentNullException: value is null.
|
|
ToString ( byte value, int startIndex ) : string |
Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string representation. Parameters: value: An array of bytes. startIndex: The starting position within value. Returns: A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in a subarray of value; for example, "7F-2C-4A". Exceptions: System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex is less than zero or greater than the length of value minus 1.
|
|
ToString ( byte value, int startIndex, int length ) : string |
Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string representation. Parameters: value: An array of bytes. startIndex: The starting position within value. length: The number of array elements in value to convert. Returns: A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in a subarray of value; for example, "7F-2C-4A". Exceptions: System.ArgumentNullException: value is null. System.ArgumentOutOfRangeException: startIndex or length is less than zero. -or- startIndex is greater than zero and is greater than or equal to the length of value. System.ArgumentException: The combination of startIndex and length does not specify a position within value; that is, the startIndex parameter is greater than the length of value minus the length parameter.
|
|
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.
|
Method | Description | |
---|---|---|
EndianBitConverter ( ) : System |
public static GetBytes ( bool value ) : byte[] | ||
value | bool | |
return | byte[] |
public static GetBytes ( char value ) : byte[] | ||
value | char | |
return | byte[] |
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 ToBoolean ( byte value, int startIndex ) : bool | ||
value | byte | |
startIndex | int | |
return | bool |
public static ToChar ( byte value, int startIndex ) : char | ||
value | byte | |
startIndex | int | |
return | char |
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 ToString ( byte value ) : string | ||
value | byte | |
return | string |
public static ToString ( byte value, int startIndex ) : string | ||
value | byte | |
startIndex | int | |
return | string |
public static ToString ( byte value, int startIndex, int length ) : string | ||
value | byte | |
startIndex | int | |
length | int | |
return | string |
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 |