C# Convert ToUInt16(UInt16)
Description
Convert ToUInt16(UInt16)
returns the specified 16-bit
unsigned integer; no actual conversion is performed.
Syntax
Convert.ToUInt16(UInt16)
has the following syntax.
[CLSCompliantAttribute(false)]
public static ushort ToUInt16(
ushort value
)
Parameters
Convert.ToUInt16(UInt16)
has the following parameters.
value
- The 16-bit unsigned integer to return.
Returns
Convert.ToUInt16(UInt16)
method returns value is returned unchanged.
Example
//w w w . ja v a2 s . co m
using System;
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(Convert.ToUInt16((UInt16)123));
}
}
The code above generates the following result.