adspace


Hi to everybody. Lastweek i had taken an interview on c#.
They ask what is boxing & unboxing, Masking.Please tell the
answer and it is useful for me.

Answer Posted / chandu

Boxing:converting from value types to reference type is
known as boxing.
Unboxing:Converting from reference types to value type is
known as unboxing.

boxing ex: int i=1;
obj o=i;

unboxing ex: int i=1;
obj o=i;
int j=int o;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an abstract class c#?

967


How do you inherit a class into other class in c#?

992


Which namespaces are necessary to create a localized application?

1140


How to assign Null value to Var?

1061


Why can't we use a static class instead of singleton?

952


What is expression tree in c#?

996