Csharp/C Sharp/Data Types/ushort

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

ushort OverFlow

<source lang="csharp"> using System; class IntegerOverFlowConst {

   static void Main() {
       const ushort MAXUSHORT = 65535;
       const ushort ONE = 1;
       unchecked {
           ushort total = MAXUSHORT + ONE;
       }
       Console.ReadLine();
   }

}

</source>