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

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

Answer Posted / somnath nanekar

it will give an error...(we hv to typecast object to int)

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is renderbody?

756


Why to use html.partial in mvc?

913


Mention two instances where routing is not implemented or required?

941


What is viewstart page in mvc?

767


What type of filter does outputcacheattribute class represents?

889


what is code first approach?

802


What is entity framework in asp net?

736


In Server how to check whether model has error or not in ASP.Net MVC

858


What is the difference between viewbag and viewdata in mvc?

729


What is routeconfig.cs in mvc 4?

870


Explain linq to entities? : Entity framework

751


What is representational state transfer (rest) mean?

755


What is the difference between partial and renderpartial?

681


what is minimum requirement for entity framework applications to run?

809


Can we have enum in entity framework?

793