IBinaryInteger<TSelf>.ReadBigEndian Method

Definition

Overloads

ReadBigEndian(Byte[], Boolean)

Reads a two's complement number from a given array, in big-endian format, and converts it to an instance of the current type.

ReadBigEndian(ReadOnlySpan<Byte>, Boolean)

Reads a two's complement number from a given span, in big-endian format, and converts it to an instance of the current type.

ReadBigEndian(Byte[], Int32, Boolean)

Reads a two's complement number from a given array, in big-endian format, and converts it to an instance of the current type.

ReadBigEndian(Byte[], Boolean)

Source:
IBinaryInteger.cs
Source:
IBinaryInteger.cs
Source:
IBinaryInteger.cs

Reads a two's complement number from a given array, in big-endian format, and converts it to an instance of the current type.

C#
public static virtual TSelf ReadBigEndian(byte[] source, bool isUnsigned);

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

TSelf

The value read from source.

Exceptions

source is not representable by TSelf

Applies to

.NET 10 a ďalšie verzie
Produkt Verzie
.NET 7, 8, 9, 10

ReadBigEndian(ReadOnlySpan<Byte>, Boolean)

Source:
IBinaryInteger.cs
Source:
IBinaryInteger.cs
Source:
IBinaryInteger.cs

Reads a two's complement number from a given span, in big-endian format, and converts it to an instance of the current type.

C#
public static virtual TSelf ReadBigEndian(ReadOnlySpan<byte> source, bool isUnsigned);

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

TSelf

The value read from source.

Exceptions

source is not representable by TSelf

Applies to

.NET 10 a ďalšie verzie
Produkt Verzie
.NET 7, 8, 9, 10

ReadBigEndian(Byte[], Int32, Boolean)

Source:
IBinaryInteger.cs
Source:
IBinaryInteger.cs
Source:
IBinaryInteger.cs

Reads a two's complement number from a given array, in big-endian format, and converts it to an instance of the current type.

C#
public static virtual TSelf ReadBigEndian(byte[] source, int startIndex, bool isUnsigned);

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

TSelf

The value read from source starting at startIndex.

Exceptions

source is not representable by TSelf

Applies to

.NET 10 a ďalšie verzie
Produkt Verzie
.NET 7, 8, 9, 10