- Implicit Type Casting
- Explicit Type Casting
Implicit type casting is the casting which is done by your CLR of compiler. In this type of casting it will itself convert one type into another type. But the only condition is that the conversion must be compatible.
Example
Int x = 5;
Float y = 6f;
y=x;
Explicit Type Casting
Explicit is the process in which we manually convert the one type of data into another type of data. But there is a chance of data loss in type of explicit type of casting. Apart from this the data type must be compatible.
Comments
Post a Comment