mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Final cleanup of DiscImageChef.Helpers.
This commit is contained in:
@@ -36,21 +36,21 @@ using System.Linq;
|
||||
namespace DiscImageChef
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts base data types to an array of bytes, and an array of bytes to base
|
||||
/// data types.
|
||||
/// All info taken from the meta data of System.BitConverter. This implementation
|
||||
/// allows for Endianness consideration.
|
||||
/// Converts base data types to an array of bytes, and an array of bytes to base
|
||||
/// data types.
|
||||
/// All info taken from the meta data of System.BitConverter. This implementation
|
||||
/// allows for Endianness consideration.
|
||||
/// </summary>
|
||||
public static class BigEndianBitConverter
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates the byte order ("endianess") in which data is stored in this computer
|
||||
/// architecture.
|
||||
/// Indicates the byte order ("endianess") in which data is stored in this computer
|
||||
/// architecture.
|
||||
/// </summary>
|
||||
public static bool IsLittleEndian { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Converts the specified double-precision floating point number to a 64-bit signed integer.
|
||||
/// Converts the specified double-precision floating point number to a 64-bit signed integer.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>A 64-bit signed integer whose value is equivalent to value.</returns>
|
||||
@@ -61,7 +61,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified Boolean value as an array of bytes.
|
||||
/// Returns the specified Boolean value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">A Boolean value.</param>
|
||||
/// <returns>An array of bytes with length 1.</returns>
|
||||
@@ -71,7 +71,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified Unicode character value as an array of bytes.
|
||||
/// Returns the specified Unicode character value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">A character to convert.</param>
|
||||
/// <returns>An array of bytes with length 2.</returns>
|
||||
@@ -81,7 +81,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified double-precision floating point value as an array of bytes.
|
||||
/// Returns the specified double-precision floating point value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 8.</returns>
|
||||
@@ -91,7 +91,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified single-precision floating point value as an array of bytes.
|
||||
/// Returns the specified single-precision floating point value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 4.</returns>
|
||||
@@ -101,7 +101,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified 32-bit signed integer value as an array of bytes.
|
||||
/// Returns the specified 32-bit signed integer value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 4.</returns>
|
||||
@@ -111,7 +111,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified 64-bit signed integer value as an array of bytes.
|
||||
/// Returns the specified 64-bit signed integer value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 8.</returns>
|
||||
@@ -121,7 +121,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified 16-bit signed integer value as an array of bytes.
|
||||
/// Returns the specified 16-bit signed integer value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 2.</returns>
|
||||
@@ -131,7 +131,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified 32-bit unsigned integer value as an array of bytes.
|
||||
/// Returns the specified 32-bit unsigned integer value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 4.</returns>
|
||||
@@ -141,7 +141,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified 64-bit unsigned integer value as an array of bytes.
|
||||
/// Returns the specified 64-bit unsigned integer value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 8.</returns>
|
||||
@@ -151,7 +151,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the specified 16-bit unsigned integer value as an array of bytes.
|
||||
/// Returns the specified 16-bit unsigned integer value as an array of bytes.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>An array of bytes with length 2.</returns>
|
||||
@@ -161,7 +161,7 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the specified 64-bit signed integer to a double-precision floating point number.
|
||||
/// Converts the specified 64-bit signed integer to a double-precision floating point number.
|
||||
/// </summary>
|
||||
/// <param name="value">The number to convert.</param>
|
||||
/// <returns>A double-precision floating point number whose value is equivalent to value.</returns>
|
||||
@@ -171,55 +171,71 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a Boolean value converted from one byte at a specified position in a byte array.
|
||||
/// Returns a Boolean value converted from one byte at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>true if the byte at <see cref="startIndex"/> in value is nonzero; otherwise, false.</returns>
|
||||
/// <returns>true if the byte at <see cref="startIndex" /> in value is nonzero; otherwise, false.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException"><see cref="startIndex"/> is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// <see cref="startIndex" /> is less than zero or greater than the
|
||||
/// length of value minus 1.
|
||||
/// </exception>
|
||||
public static bool ToBoolean(byte[] value, int startIndex)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a Unicode character converted from two bytes at a specified position in a byte array.
|
||||
/// Returns a Unicode character converted from two bytes at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A character formed by two bytes beginning at <see cref="startIndex"/>.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="startIndex"/> equals the length of value minus 1.</exception>
|
||||
/// <returns>A character formed by two bytes beginning at <see cref="startIndex" />.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="startIndex" /> equals the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException"><see cref="startIndex"/> is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// <see cref="startIndex" /> is less than zero or greater than the
|
||||
/// length of value minus 1.
|
||||
/// </exception>
|
||||
public static char ToChar(byte[] value, int startIndex)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a double-precision floating point number converted from eight bytes at a specified position in a byte array.
|
||||
/// Returns a double-precision floating point number converted from eight bytes at a specified position in a byte
|
||||
/// array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A double precision floating point number formed by eight bytes beginning at <see cref="startIndex"/>.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="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.</exception>
|
||||
/// <returns>A double precision floating point number formed by eight bytes beginning at <see cref="startIndex" />.</returns>
|
||||
/// <exception cref="System.ArgumentException">
|
||||
/// <see cref="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.
|
||||
/// </exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException"><see cref="startIndex"/> is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// <see cref="startIndex" /> is less than zero or greater than the
|
||||
/// length of value minus 1.
|
||||
/// </exception>
|
||||
public static double ToDouble(byte[] value, int startIndex)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array.
|
||||
/// Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A 16-bit signed integer formed by two bytes beginning at <see cref="startIndex"/>.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="startIndex"/> equals the length of value minus 1.</exception>
|
||||
/// <returns>A 16-bit signed integer formed by two bytes beginning at <see cref="startIndex" />.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="startIndex" /> equals the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// startIndex is less than zero or greater than the length of value
|
||||
/// minus 1.
|
||||
/// </exception>
|
||||
public static short ToInt16(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -228,14 +244,20 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.
|
||||
/// Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A 32-bit signed integer formed by four bytes beginning at <see cref="startIndex"/>.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="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.</exception>
|
||||
/// <returns>A 32-bit signed integer formed by four bytes beginning at <see cref="startIndex" />.</returns>
|
||||
/// <exception cref="System.ArgumentException">
|
||||
/// <see cref="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.
|
||||
/// </exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// startIndex is less than zero or greater than the length of value
|
||||
/// minus 1.
|
||||
/// </exception>
|
||||
public static int ToInt32(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -244,14 +266,20 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.
|
||||
/// Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A 64-bit signed integer formed by eight bytes beginning at <see cref="startIndex"/>.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="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.</exception>
|
||||
/// <returns>A 64-bit signed integer formed by eight bytes beginning at <see cref="startIndex" />.</returns>
|
||||
/// <exception cref="System.ArgumentException">
|
||||
/// <see cref="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.
|
||||
/// </exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException"><see cref="startIndex"/> is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// <see cref="startIndex" /> is less than zero or greater than the
|
||||
/// length of value minus 1.
|
||||
/// </exception>
|
||||
public static long ToInt64(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -260,14 +288,21 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a single-precision floating point number converted from four bytes at a specified position in a byte array.
|
||||
/// Returns a single-precision floating point number converted from four bytes at a specified position in a byte
|
||||
/// array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A single-precision floating point number formed by four bytes beginning at <see cref="startIndex"/>.</returns>
|
||||
/// <exception cref="System.ArgumentException"><see cref="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.</exception>
|
||||
/// <returns>A single-precision floating point number formed by four bytes beginning at <see cref="startIndex" />.</returns>
|
||||
/// <exception cref="System.ArgumentException">
|
||||
/// <see cref="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.
|
||||
/// </exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException"><see cref="startIndex"/> is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// <see cref="startIndex" /> is less than zero or greater than the
|
||||
/// length of value minus 1.
|
||||
/// </exception>
|
||||
public static float ToSingle(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -276,10 +311,14 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the numeric value of each element of a specified array of bytes to its equivalent hexadecimal string representation.
|
||||
/// Converts the numeric value of each element of a specified array of bytes to its equivalent hexadecimal string
|
||||
/// representation.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <returns>A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in value; for example, "7F-2C-4A".</returns>
|
||||
/// <returns>
|
||||
/// A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding
|
||||
/// element in value; for example, "7F-2C-4A".
|
||||
/// </returns>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
public static string ToString(byte[] value)
|
||||
{
|
||||
@@ -287,13 +326,20 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string representation.
|
||||
/// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string
|
||||
/// representation.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <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".</returns>
|
||||
/// <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".
|
||||
/// </returns>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// startIndex is less than zero or greater than the length of value
|
||||
/// minus 1.
|
||||
/// </exception>
|
||||
public static string ToString(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -302,15 +348,25 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string representation.
|
||||
/// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string
|
||||
/// representation.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <param name="length">The number of array elements in value to convert.</param>
|
||||
/// <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".</returns>
|
||||
/// <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".
|
||||
/// </returns>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="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.</exception>
|
||||
/// <exception cref="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.</exception>
|
||||
/// <exception cref="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.
|
||||
/// </exception>
|
||||
/// <exception cref="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.
|
||||
/// </exception>
|
||||
public static string ToString(byte[] value, int startIndex, int length)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -319,14 +375,17 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array.
|
||||
/// Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">The array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A 16-bit unsigned integer formed by two bytes beginning at startIndex.</returns>
|
||||
/// <exception cref="System.ArgumentException">startIndex equals the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// startIndex is less than zero or greater than the length of value
|
||||
/// minus 1.
|
||||
/// </exception>
|
||||
public static ushort ToUInt16(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -335,14 +394,20 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.
|
||||
/// Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A 32-bit unsigned integer formed by four bytes beginning at startIndex.</returns>
|
||||
/// <exception cref="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.</exception>
|
||||
/// <exception cref="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.
|
||||
/// </exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// startIndex is less than zero or greater than the length of value
|
||||
/// minus 1.
|
||||
/// </exception>
|
||||
public static uint ToUInt32(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
@@ -351,14 +416,20 @@ namespace DiscImageChef
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array.
|
||||
/// Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array.
|
||||
/// </summary>
|
||||
/// <param name="value">An array of bytes.</param>
|
||||
/// <param name="startIndex">The starting position within value.</param>
|
||||
/// <returns>A 64-bit unsigned integer formed by the eight bytes beginning at startIndex.</returns>
|
||||
/// <exception cref="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.</exception>
|
||||
/// <exception cref="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.
|
||||
/// </exception>
|
||||
/// <exception cref="System.ArgumentNullException">value is null.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">startIndex is less than zero or greater than the length of value minus 1.</exception>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">
|
||||
/// startIndex is less than zero or greater than the length of value
|
||||
/// minus 1.
|
||||
/// </exception>
|
||||
public static ulong ToUInt64(byte[] value, int startIndex)
|
||||
{
|
||||
return !IsLittleEndian
|
||||
|
||||
Reference in New Issue
Block a user