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

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

Answer Posted / deepika

It will give error: "Operator '+' cannot be applied to
operands of type 'int' and 'object'"

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between viewbag and viewdata in mvc?

542


How OS come to know whether to load the .net framework when we run an .exe created using .Net framework?

569


The order of the filters that get executed, if the multiple filters are implemented?

615


How we can call a javascript function on the change of a dropdown list in mvc?

572


What is meant by viewdata?

552






What are the 3 main components of an asp.net mvc application?

538


What is an asynchronous controller in asp.net mvc?

545


What is namespace of asp.net mvc?

600


What is the use of web api ? Why web api needed, if you have already restful services using wcf ?

546


What does a viewmodel do?

523


What is viewbag?

615


What is asp net framework?

514


What is the difference between ViewData, ViewBag and TempData?

637


Is .net framework dead?

535


What are Action Methods in ASP.NET MVC?

574