Boxing: It is explicit conversion. It is a process of converting the value type to reference type.
For Eg: int, bool is a value type which is used to convert the reference type
Boxing value is stored in heap
UnBoxing: It is implicit conversion. It is a process of converting the reference type to value type.
For Eg: object is a reference type which is used to convert the value type
No comments:
Post a Comment