March 2004
Intermediate to advanced
560 pages
26h 47m
English
public abstract class ValueType { // Constructors protected ValueType (); // Methods public override bool Equals (object obj); public override int GetHashCode (); CF public override string ToString (); }
|
BA Notice we override Equals, GetHashCode, and ToString from System.Object in this class. We did this because the implementations inherited from Object rely on the object's referential identity, so they make no sense for value types. We can also provide slightly more efficient implementations of those methods. |
Read now
Unlock full access