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

You need to be able to retrieve data from DataSet object that has four DataTable objects. There are currently UniqueConstraint and ForeignKeyConstraint Object on the DataTable objects to enforce the data rules. You find that you can retrieve the data from the individual DataTable objects, but you are not able to retrieve the data from the combination of DataTable objects in a Parent/Child manner. What should you do to able to retrieve the data in a Parent/Child manner? a) Set the EnforceParentChild parameter of the DataSet to True. b) Set the EnforceRelation parameter of the Relations collection to True. c) Add DataRelation objects to the Relations Collection to make the DataSet present the data in Parent/Child manner. d) Add a primary key and a foreign key to each of the DataTable objects that should present the data in a Parent/Child manner.

1 Answers   Syntax Softtech,


Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?

0 Answers  


what is an Eventbubbling?

3 Answers   DSS,


What is mvc in angular?

0 Answers  


ASP.NET Web Service

1 Answers  






what is the uses Of Global.asax

3 Answers  


How to implement role based security in asp.net mvc? : Asp.Net MVC

0 Answers  


What websites use asp.net?

0 Answers  


Explain Page life cycle

8 Answers   DELL,


Distinguish between Server-side and Client-side code?

0 Answers   Siebel,


How many types of sessions in asp.net?

0 Answers   MaxSolPro,


Explain the asp.net session state modes.

0 Answers  


Categories