What is implicit cast and explicit cast in .Net?Implicit cast:
- It allows conversion without and loss of data. - It takes place only when there is no possiblility of loss of data. - It does not require a casting operator. - It is used when converting data from derived types of the base type.
Explicit cast:
- When there is any possibility of loss of data, an explicit cast is required. - Explicit cast if not applied properly can result a loss of data precision. - It requires a casting operator - It is used when converting a base type or a derived type.
|