What is Boxing and Unboxing?

Answer Posted / kautilya

Boxing is to implicitly converting value type to refrence
type,

int x = 10;
double y = x;


Unboxing is to explicitly converting refrence type to value
type

double y = 10.234;
int x = (int)y;

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does google crawl redirects?

515


What is the file extension of web service?

553


How you can stop the validation of ASP.NET controls from client side?

528


What are the advantages of Web API?

634


What is the life cycle of web page?

521






How can we inherit a static member?

590


Which is faster union or union all?

572


What is directive in asp net?

539


Write some code using interfaces, virtual methods, and an abstract class`

1577


How can you make sure that web api returns json data only?

514


What is postback and autopostback in asp.net?

525


Differentiate strong typing and weak typing

524


What tags do you need to add within the asp:datagrid tags to bind columns manually? How?

510


What are the new web part controls in asp.net 2.0 ?

524


What parameters can you pass in the url of the api? Can get and post use the same url?

556