What is boxing and how it is done internally?
Answers were Sorted based on User's Feedback
Answer / surya
Boxing is an implicit conversion of a value type to the
type object
int i = 123; // A value type
Object box = i // Boxing
CASTING: casting is the process of converting a variable
from one type to another (from a string to an integer)
Unboxing is an explicit conversion from the type object to
a value type
int i = 123; // A value type
object box = i; // Boxing
int j = (int) box; // Unboxing
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / sesu
Boxing is the conversion value type to ref. type.
int i=5 -- value type
Object obj; -- Referance type
obj=i; -- Boxing
int j =(int) obj -- Unboxing
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / sandhya
Boxing is an implicit conversion of a value type to the
type object
int i = 123; // A value type
Object box = i // Boxing
In case of value type ,value is stored in the stack but
after boxing process value is stored in to heap.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / sudhir singh
the process of converting value type to reference type is
called as boxing.
it is an implicit conversion.
| Is This Answer Correct ? | 0 Yes | 0 No |
Name the template that is used to create a user-defined component.
What is the default property of data control?
Is typeform free?
How do you display an editable drop-down list?
Which template creates a .net compact framework 2.0 forms application for pocket pc 2003 and later?
How to create class level variable that can be assigned value at the time of declaration and in the constructor alone?
How many system controls are available ?
Which property of the progressbar control specifies the amount to increment the current value of the control?
What is form record?
Name the method that has to be overridden to change the appearance of the control that is inherited from an existing control.
What are the components of gui for windows?
Which C# access modifier helps to limit the accessibility of a class member within the same assembly?