Compartilhar via


Byte.ToUnsignedInt(SByte) Method

Definition

Converts the argument to an int by an unsigned conversion.

[Android.Runtime.Register("toUnsignedInt", "(B)I", "", ApiSince=26)]
public static int ToUnsignedInt (sbyte x);
[<Android.Runtime.Register("toUnsignedInt", "(B)I", "", ApiSince=26)>]
static member ToUnsignedInt : sbyte -> int

Parameters

x
SByte

the value to convert to an unsigned int

Returns

the argument converted to int by an unsigned conversion

Attributes

Remarks

Converts the argument to an int by an unsigned conversion. In an unsigned conversion to an int, the high-order 24 bits of the int are zero and the low-order 8 bits are equal to the bits of the byte argument.

Consequently, zero and positive byte values are mapped to a numerically equal int value and negative byte values are mapped to an int value equal to the input plus 2<sup>8</sup>.

Added in 1.8.

Java documentation for java.lang.Byte.toUnsignedInt(byte).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to