will this code works fine? or will it gives error?
Object obj=5;
int i=6;
i=i+obj;
Answer Posted / amit kumar sharma
//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 ? | 8 Yes | 1 No |
Post New Answer View All Answers
What are the components required to create a route in ASP.Net MVC?
Mention some action filters which are used regularly in ASP.Net MVC?
What is connected scenario? : Entity framework
What is Peek method in Tempdata in ASP.Net MVC?
What are HTML Helpers, AJAX Helpers in ASP.Net MVC?
What is the importance of NonActionAttribute?
What are sections?
Is entity framework slow?
What are the 3 segments of the default route, that is present in an ASP.NET MVC application?
Explain dependency resolution?
Is it possible to cancel filter execution?
In Server how to check whether model has error or not in ASP.Net MVC
explain how you can load related entities in ef (entity framework)?
What is the difference between model view and controller?
how do you query in entity model when the result has a join from from different database other than the entity model?