Short.ToUnsignedLong(Int16) 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.
Converts the argument to a long
by an unsigned
conversion.
[Android.Runtime.Register("toUnsignedLong", "(S)J", "", ApiSince=26)]
public static long ToUnsignedLong (short x);
[<Android.Runtime.Register("toUnsignedLong", "(S)J", "", ApiSince=26)>]
static member ToUnsignedLong : int16 -> int64
Parameters
- x
- Int16
the value to convert to an unsigned long
Returns
the argument converted to long
by an unsigned
conversion
- Attributes
Remarks
Converts the argument to a long
by an unsigned conversion. In an unsigned conversion to a long
, the high-order 48 bits of the long
are zero and the low-order 16 bits are equal to the bits of the short
argument.
Consequently, zero and positive short
values are mapped to a numerically equal long
value and negative short
values are mapped to a long
value equal to the input plus 2<sup>16</sup>.
Added in 1.8.
Java documentation for java.lang.Short.toUnsignedLong(short)
.
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.