k-World

Many of the programmers are using Implicit and Explicit word when speaking about technology. Here in brief I am trying to explain the meanings in technical terms.

Implicit : Implicit in case of C# programming, whatever the work (casting) needs to be done will be taken care by the CLR (Common Language Run time) in the .Net. So there is no need for the programmer to cast the values.

Ex: Converting the int data type to the long data type doesn’t need any casting.

    int number = 69;

    long longNumber = number; //Implicitly casting is taken care by the CLR.

Explicit: Explicit in case of C# programming, here programmer need to write the extra code to cast the value as it’s not taken by the CLR of .Net.

Ex: Converting the double data type to the int needs casting.

    double doubleNumber = 2.345;

    int integerNumber = (int) doubleNumber;

Leave a comment