Create an unsigned short type in CSharp
Description
The following code shows how to create an unsigned short type.
Example
using System;/*from w w w . j a va 2 s .co m*/
using System.Collections.Generic;
using System.Text;
class Program {
static void Main(string[] args) {
ushort myOtherUInt16 = 12000;
Console.WriteLine("Max for an UInt16 is: {0} ", ushort.MaxValue);
Console.WriteLine("Min for an UInt16 is: {0} ", ushort.MinValue);
Console.WriteLine("Value is: {0} ", myOtherUInt16);
Console.WriteLine("I am a: {0} ", myOtherUInt16.GetType());
}
}
The code above generates the following result.