This Blog Has Been Moved !

This Blog Has been moved to http://aleemkhan.wordpress.com

Brad Abrams Posted a small Equality Quiz

Its just 10 min but it was fun. Here are my answers (Try yoursellf first)
public static void Question1()
{
int x = 10;
long y = 10;
Console.WriteLine(x==y && !x.Equals(y));
}
public static void Question2()
{
object x = 10;
object y = 10;
Console.WriteLine(x!=y && x.Equals(y));
}
public static void Question3()
{
object x = new object();
int y = 10;
Console.WriteLine(x==y);
}
public static void Question4()
{
int x = 10;
int y = 10;
Console.WriteLine(x == y && (object)x!=(object)y);
}

Comments

0 comments have been posted.