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
What is polymorphism and its types in c#?
Are structs value types or reference types?
What is the difference between struct and class in c#?
Can you explicitly call a destructor?
What do multicast delegates mean?
What is the difference between static and private constructor in c#?
Perfect Example Of While And Do-While Loop In C#.Net ?
Define interface class in c#?
What is the difference between method parameters and method arguments. Give an example?
What are methods c#?
What are delegates and why are they required?
What is iqueryable and ienumerable in c#?
What is stringwriter c#?
Explain About CLS?
What is asenumerable in c#?