C
cody
What is Boxing & UnBoxing in .NET?
implicit conversion from reference type (class,interface) to a value type
(struct, primitive data types like int) is called boxing:
object obj = 1234;
unboxing is to convert the boxed struct back to its original form:
int i = (int)obj;
boxing and unboxing is a relatively expensive operation and should be
avoided if you have performance problems.
implicit conversion from reference type (class,interface) to a value type
(struct, primitive data types like int) is called boxing:
object obj = 1234;
unboxing is to convert the boxed struct back to its original form:
int i = (int)obj;
boxing and unboxing is a relatively expensive operation and should be
avoided if you have performance problems.