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
Describe ways of cleaning up objects in c#.
What is default value of enum c#?
What does void do in unity?
Explain the difference between // comments, /* */ comments and /// comments?
What do you know about Translate Accelerator?
What is the relationship between a process, application domain, and application?
Why do you call it a process? What’s different between process and application in .net, not common computer usage, terminology?
Explain the difference between passing parameters by value and passing parameters by reference with an example?
Is c# good for beginners?
what is IEquatable
What is an example of delegation?
How to use nullable types in .net?
In gridview in editmode if we want to display information in one combobox based on
What is Garbage Collection in .Net?
What is generic method in c#?