Fijaos y escribid esto en el Visual Studio
object o1 = 5;
object o2 = 5;
System.Diagnostics.Debug.WriteLine(o1 == o2);
System.Diagnostics.Debug.WriteLine(o1.Equals(o2));
System.Diagnostics.Debug.WriteLine(((Int32) o1).CompareTo(o2));
La respuesta es:
False
True
0
¿Por qué? Pues por que el tipo Int32 (recordemos …