public override bool Equals(object obj) { if (!(obj is CPersona)) { return(false); } CPersona p = (CPersona)obj; return(dpi.Equals(p.dpi)); }
public virtual int CompareTo(object obj) { if (obj == null) { throw new InvalidOperationException("Null object passed."); } CPersona p = (CPersona)obj; int result; result = apellido.CompareTo(p.apellido); return(result); }