Implicit cast

image_pdfimage_print
   
 

using System;
class ImplicitConversion {
    public static void Main() {
        byte a = 1;
        int b = 1234;
        int c = a; //Implicit cast
        double d = b; //Implicit cast
        Console.WriteLine("{0}", c);
        Console.WriteLine("{0}", d);
    }
}

    


This entry was posted in Data Types. Bookmark the permalink.