int i = 1;
int j = 1;
System.Console.WriteLine(i == j);
System.Console.WriteLine(i.ToString() == j.ToString());
System.Console.WriteLine((object)i == (object)j);
Give the sample code above, what is the output to the console?
Answer Posted / sahdev singh
True - First time we are comparing only values.
True - Second time also we are comparing only values.
False - We are comparing reference of two objects.
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
is it possible to access a remote web service Without UDDI?
What is the difference between == and object.equals?
What is bit in c#?
Why we use extension method in c#?
Is collection a data structure?
What is difference between Enum and Struct?
How does c# generics and c++ templates compare?
What is difference between private, protected, and public in C#?
Which .gang of four. Design pattern is shown below?
Is javascript harder than c#?
Is c# still popular?
What is the benefit of using interface in c#?
Can abstract class be sealed in c#?
Is c# good for beginners?
How many destructors can a class have?