public int CompareTo(object obj) { if(obj is Time) { Time otherTime = (Time) obj; return MSeconds.CompareTo(otherTime.MSeconds); } else throw new ArgumentException("Object is not a Temperature"); }