C# Convert ToInt16(UInt64)
Description
Convert ToInt16(UInt64)
converts the value of the specified
64-bit unsigned integer to an equivalent 16-bit signed integer.
Syntax
Convert.ToInt16(UInt64)
has the following syntax.
[CLSCompliantAttribute(false)]
public static short ToInt16(
ulong value
)
Parameters
Convert.ToInt16(UInt64)
has the following parameters.
value
- The 64-bit unsigned integer to convert.
Returns
Convert.ToInt16(UInt64)
method returns A 16-bit signed integer that is equivalent to value.
Example
/*from w w w . j av a 2 s . c o m*/
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Convert.ToInt16((UInt64)123));
}
}
The code above generates the following result.