Consider this code:
int age = 25; short newAge = 25; Console.WriteLine(age == newAge); //true Console.WriteLine(newAge.Equals(age)); //false Console.ReadLin
Because there is no overload for short.Equals that accepts an int. Therefore, this is called:
short.Equals
int
public override bool Equals(object obj) { return obj is short && this == (short)obj; }
obj is not a short.. therefore, it is false.
obj
short