Прочетете на английски Редактиране

Споделяне чрез


BitConverter.ToInt128 Method

Definition

Overloads

ToInt128(ReadOnlySpan<Byte>)

Converts a read-only byte span into a 128-bit signed integer.

ToInt128(Byte[], Int32)

Returns a 128-bit signed integer converted from sixteen bytes at a specified position in a byte array.

ToInt128(ReadOnlySpan<Byte>)

Source:
BitConverter.cs

Converts a read-only byte span into a 128-bit signed integer.

public static Int128 ToInt128 (ReadOnlySpan<byte> value);

Parameters

value
ReadOnlySpan<Byte>

A read-only span containing the bytes to convert.

Returns

A 128-bit signed integer representing the converted bytes.

Exceptions

The length of value is less than 16.

Applies to

.NET 9
Продукт Версии
.NET 9

ToInt128(Byte[], Int32)

Source:
BitConverter.cs

Returns a 128-bit signed integer converted from sixteen bytes at a specified position in a byte array.

public static Int128 ToInt128 (byte[] value, int startIndex);

Parameters

value
Byte[]

An array of bytes.

startIndex
Int32

The starting position within value.

Returns

A 128-bit signed integer formed by sixteen bytes beginning at startIndex.

Exceptions

startIndex is greater than or equal to the length of value minus 15, and is less than or equal to the length of value minus 1.

value is null.

startIndex is less than zero or greater than the length of value minus 1.

Applies to

.NET 9
Продукт Версии
.NET 9