public int CompareTo(object obj) { if (obj is Sofinummer) { Sofinummer other = (Sofinummer)obj; return value.CompareTo(other.value); } throw new ArgumentException("obj is not a Sofinummer"); }