I have a static method which simply compares two values and returns the result
public class Calculator
{
public static bool AreEqual(object value1, object value2)
{
return value1 == value2;
}
}
bool Equal = Calculator.AreEqual("a", "a"); // returns true
bool Equal = Calculator.AreEqual(1, 1); // returns false
Can someone please explain what is going on behind the scenes that produces the output described above
See Question&Answers more detail:os