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



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

Answer / 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

More ASP.NET Interview Questions

Can we make a class with class with same;suppose public class abc { public class abc { } }

1 Answers  


What is the lifespan for items stored in ViewState?

2 Answers   ISST,


What is application Object?

0 Answers   Infogain,


What is asp net theme?

0 Answers  


How asp.net mvc differs from asp.net web forms? : asp.net mvc

0 Answers  






I am opening Crystal Report in asp.Net 3.5. Report is opening very well but when I click on Refresh button of Crystal Report then it gives "Missing Parameter values" I also tried property of CR Viewer like crViewer.ReuseParameterValuesOnRefresh = True But it is not working. Plz give me solution.

1 Answers  


How do I open an ashx file?

0 Answers  


To match the two different controls which control would we use ?

2 Answers   Siebel,


How do you create a permanent cookie?

8 Answers   Siebel Systems,


what are partial classes and their use?

3 Answers   Microsoft,


1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????

7 Answers   Sparsh,


What are the different types of Caching techniques in ASP.NET?

0 Answers  


Categories