IBinaryInteger<TSelf>.ReadLittleEndian Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReadLittleEndian(Byte[], Boolean) |
Reads a two's complement number from a given array, in little-endian format, and converts it to an instance of the current type. |
ReadLittleEndian(ReadOnlySpan<Byte>, Boolean) |
Reads a two's complement number from a given span, in little-endian format, and converts it to an instance of the current type. |
ReadLittleEndian(Byte[], Int32, Boolean) |
Reads a two's complement number from a given array, in little-endian format, and converts it to an instance of the current type. |
ReadLittleEndian(Byte[], Boolean)
- Source:
- IBinaryInteger.cs
- Source:
- IBinaryInteger.cs
- Source:
- IBinaryInteger.cs
Reads a two's complement number from a given array, in little-endian format, and converts it to an instance of the current type.
public:
static override TSelf ReadLittleEndian(cli::array <System::Byte> ^ source, bool isUnsigned);
public static virtual TSelf ReadLittleEndian (byte[] source, bool isUnsigned);
static member ReadLittleEndian : byte[] * bool -> 'Self
Public Shared Overrides Function ReadLittleEndian (source As Byte(), isUnsigned As Boolean) As TSelf
Parameters
- source
- Byte[]
The array from which the two's complement number should be read.
- isUnsigned
- Boolean
true
if source
represents an unsigned two's complement number; otherwise, false
to indicate it represents a signed two's complement number.
Returns
The value read from source
.
Exceptions
source
is not representable by TSelf
Applies to
ReadLittleEndian(ReadOnlySpan<Byte>, Boolean)
- Source:
- IBinaryInteger.cs
- Source:
- IBinaryInteger.cs
- Source:
- IBinaryInteger.cs
Reads a two's complement number from a given span, in little-endian format, and converts it to an instance of the current type.
public:
static override TSelf ReadLittleEndian(ReadOnlySpan<System::Byte> source, bool isUnsigned);
public static virtual TSelf ReadLittleEndian (ReadOnlySpan<byte> source, bool isUnsigned);
static member ReadLittleEndian : ReadOnlySpan<byte> * bool -> 'Self
Public Shared Overrides Function ReadLittleEndian (source As ReadOnlySpan(Of Byte), isUnsigned As Boolean) As TSelf
Parameters
- source
- ReadOnlySpan<Byte>
The array from which the two's complement number should be read.
- isUnsigned
- Boolean
true
if source
represents an unsigned two's complement number; otherwise, false
to indicate it represents a signed two's complement number.
Returns
The value read from source
.
Exceptions
source
is not representable by TSelf
Applies to
ReadLittleEndian(Byte[], Int32, Boolean)
- Source:
- IBinaryInteger.cs
- Source:
- IBinaryInteger.cs
- Source:
- IBinaryInteger.cs
Reads a two's complement number from a given array, in little-endian format, and converts it to an instance of the current type.
public:
static override TSelf ReadLittleEndian(cli::array <System::Byte> ^ source, int startIndex, bool isUnsigned);
public static virtual TSelf ReadLittleEndian (byte[] source, int startIndex, bool isUnsigned);
static member ReadLittleEndian : byte[] * int * bool -> 'Self
Public Shared Overrides Function ReadLittleEndian (source As Byte(), startIndex As Integer, isUnsigned As Boolean) As TSelf
Parameters
- source
- Byte[]
The array from which the two's complement number should be read.
- startIndex
- Int32
The starting index from which the value should be read.
- isUnsigned
- Boolean
true
if source
represents an unsigned two's complement number; otherwise, false
to indicate it represents a signed two's complement number.
Returns
The value read from source
starting at startIndex
.
Exceptions
source
is not representable by TSelf