Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

will this code works fine? or will it gives error?

Object obj=5;
int i=6;
i=i+obj;

Answer Posted / naren

object obj=5 this is boxing

int i=6 this is initialization of variable.

i=i+obj; here we can't sum the value type and reference
type.


so,it gives the error.

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Peek method in Tempdata in ASP.Net MVC?

1079


Explain the use of Inversion of control (IOC)?

986


Is .net core faster than .net framework?

1020


What is the role of the jit compiler in .net framework?

1056


How can I return string result from action in asp.net mvc?

1001


What is managed extensibility framework?

940


what is csdl?

946


Explain Bundle.Config in ASP.Net MVC4?

958


What are actions in mvc?

947


What are Code Blocks in Views?

1070


Is mvc 4 supporting windows azure sdk (software development kit) ?

964


Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?

957


What are sections?

1057


In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?

1027


what is entity data model?

996