Implicit and Explicit Conversion in C Sharp

Today we will learn about Implicit and explicit Conversion in C Sharp

Implicit Conversion:
Implicit Conversion is done by the compiler.There is no loos of information if the conversion is doneĀ  and no possibility of throwing exceptions during the conversion

OUTPUT: 20

Explicit Conversion:
Explicit Conversion is done by the user.Cast operator or the convert class is used during the explicit conversion.There is problem of data loos and possibility of throwing exceptions.

OUTPUT:20

 

Leave a Reply

Your email address will not be published. Required fields are marked *