Most significant bits lost : Data Type Cast : Data Type C# Examples


C# Examples » Data Type » Data Type Cast »

 

Most significant bits lost









    
using  System;

class  MainClass
{
      static  void  Main(string[]  args)
      {
            ushort  sh  =  2000;
            byte  sb;

            sb  =  unchecked((byte)sh);                        
            Console.WriteLine("sb:  {0}",  sb);
      }
}
    
   
  
   



Output

sb: 208


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Data Type Cast