Difference b/w casting and boxing?

Answer Posted / kinjal panchal

Boxing:- Boxing is converting value type to Reference type.
for Example:-

int i=0;
object O=(object)i;

Casting:- Casting is converting value type to another value type
for example:-

int i=0;
long l=(long)i;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of proxy patterns?

678


Define application state variable and session state variable?

652


What is difference between session and cookies?

643


Where viewstate value is stored in asp.net?

693


What is query string with example?

602






What are the differences between primary foreign and unique keys?

623


How long do session variables last?

609


Difference between overriding and overloading?

783


How can we implement a identity (sql server) call in an asp.net page?

677


is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?

2055


What is the difference between an htmlinputcheckbox control and an htmlinputradiobutton control?

724


how can create login from create and written conde in asp.net

1862


How can you apply a theme to your asp.net application?

619


To load your generated dataset with data which method do you invoke?

697


Explain weak typing and strong typing.

637