will this code works fine? or will it gives error? Object
obj=5; int i=6; i=i+obj;

Answer Posted / alb.shah

can not applied this because i is value type and obj is
reference type so this will create error
//u can do this
Object obj = 5;
int i = 6;
i = i + Convert.ToInt32(obj);

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are url fragments?

508


What are validator? How do you disable them?

603


Differentiate between authentication and authorization.

565


Explain about Multi-Language integration?

603


What does the hotspot class in .net do?

571






How many types cache in asp net?

531


What are assemblies and namespaces and explain the difference between them ?

570


What is the default timeout for a cookie?

564


Define repository pattern in asp.net mvc? : asp.net mvc

505


Can a .net web application consume java web service?

514


Why we go for mvc instead of asp.net? : Asp.Net MVC

497


If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?

522


Where do the cookie state and session state information be stored?

516


What does passport and windows authentication mean in ASP.NET?

651


Can we set which type of comparison we want to perform by the CompareValidator control?

519