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

How to publish website

1 Answers   Syntel,


What is the difference between pathparam and queryparam?

0 Answers  


Where do we store our connection string in asp.net application?

0 Answers  


What are the modes of updation in an updatepanel?

0 Answers  


What are the navigation ways between pages available in ASP.NET?

0 Answers   Winsol Solutions,






What Are Different Types of Debbugers

2 Answers   Accenture, TCS, Wipro,


What is the difference between stored procedure vs function?

0 Answers  


what is the generics and where used generics in your project?

3 Answers   CTC,


What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?

0 Answers  


Describe the two main components of the .NET framework ?

2 Answers  


How you will handle session when deploying application in more than a server?

0 Answers  


What is asynchronous call?

0 Answers  


Categories