Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can I get the ascii code for a character in c#?

1000


What is difference between ienumerable and list in c#?

823


Can abstract class have constructor?

814


Why ienumerable is used in c#?

830


Explain nullable types in c#?

915


Why would you use a class property in c#?

865


how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.

1665


What is enum in c#?

907


Is cli same as the clr?

844


What is a trace and asset? Explain some differences?

1184


What are primitive types in c#?

918


What is the difference between int and int in c#?

934


What is difference between array and list?

882


Define an array?

871


What is the difference between method and constructor in c#?

999