Check the value range and size for unsigned short in CSharp
Description
The following code shows how to check the value range and size for unsigned short.
Example
using System;//www . j ava 2 s. c o m
public class MainClass
{
public static void Main()
{
Console.WriteLine("{0}: bytes: {1}, range: [{2},{3}]",
typeof(ushort).ToString(), sizeof(ushort), ushort.MinValue, ushort.MaxValue);
}
}
The code above generates the following result.