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 / manoj yadav

1.TRUE... here we only comparing two value. if it is true.
then it wil execute (1==1).
2. TRUE.. here first we convert the int value in to string.
as bothe value are same so converted value wl also same
string so
3. WRONG..here we first give a reference to object. as
bothe objects reference cant be same so FALSE

Is This Answer Correct ?    3 Yes 0 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#?

1067


What is verbatim string literal in c#?

975


Explain about finalize method?

945


What is the difference between proc. Sent by val and by sub?

996


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

917


What is the interface in c#?

959


Is a valid int value?

931


Differentiate between response.expires and response.expiresabsolute?

981


What's your approach to fetch static data in your windows form application?

1007


Name which controls do not have events?

1056


Can we set image Source dynamically using C# in WPF application?

1077


Why do we need structs in c#?

870


Can you explain template pattern?

1049


Explain the clr triggers?

956


Which are access modifiers available in c#?

955