Cast int to long implicit and cast in to short explicit : Long cast : Data Type C# Examples


C# Examples » Data Type » Long cast »

 

Cast int to long implicit and cast in to short explicit









    
using  System;

class  MainClass
{
    static  void  Main(string[]  args)
    {
        int  MyInt  =  12345;
        long  MyLong  =  MyInt;    
        short  MyShort  =  (short)MyInt;
    }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Long cast