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
Explain the difference between a Private Assembly and a Shared Assembly
What is the purpose of reserved word using in c#?
Why do we use hashtable in c#?
What are console applications used for?
In which format you can pass the value in the sleep function?
What is an argument in c#?
What is the difference between xml documentation tag?
Why abstraction is used in c#?
Why References are stored on heap and variables on stack?
Why c# is type safe?
What is delegates and events?
In how many ways you can overload a method?
What’s thread.sleep() in threading ?
What does static mean in c sharp?
What are virtual classes in c#?