.Net Interview Question
Home
Unlabelled
What is Boxing/Unboxing?
Friday, June 28, 2013
What is Boxing/Unboxing?
Name
skumardotnet
Posted at
10:05 PM
Tags
Boxing is used to convert value types to object.
E.g. int x = 1;
object obj = x ;
Unboxing is used to convert the object back to the value type.
E.g. int y = (int)obj;
Boxing/unboxing is quiet an expensive operation.
skumardotnet
Next Post
Previous Post
Emoticon
Emoticon
Subscribe to:
Post Comments (Atom)
EmoticonEmoticon