What is boxing and how it is done internally?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to get records from a database?

746


Which property is used to specify the use of an element in the user interface and reports it to the accessibility aids?

656


What is form description?

614


What is the extension of the windows installer file?

663


What is the use of runworkasync() methods?

669






Where to use new keyword other than create instance?

773


Which event occurs when a user drags an item in a treeview or listview control?

635


What are the different cloud platforms?

623


What is the difference between the add() and insert() methods of a listbox control?

665


What is form record?

615


Explain how save rerecord in the database?

667


Name the property which of menu cannot be set at run time?

742


What is a windows based application?

615


What is the full form of gac?

750


i already displaying one datagrid. now i want to make change to particular column header i.e i want to split that column header and it includes one more header.... write a code for that in windows application using C#.net

1588