will this code works fine? or will it gives error?
Object obj=5;
int i=6;
i=i+obj;
Answer Posted / naren
object obj=5 this is boxing
int i=6 this is initialization of variable.
i=i+obj; here we can't sum the value type and reference
type.
so,it gives the error.
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What is Peek method in Tempdata in ASP.Net MVC?
Explain the use of Inversion of control (IOC)?
Is .net core faster than .net framework?
What is the role of the jit compiler in .net framework?
How can I return string result from action in asp.net mvc?
What is managed extensibility framework?
what is csdl?
Explain Bundle.Config in ASP.Net MVC4?
What are actions in mvc?
What are Code Blocks in Views?
Is mvc 4 supporting windows azure sdk (software development kit) ?
Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?
What are sections?
In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?
what is entity data model?