public int CompareTo(object obj) { if (obj == null) { return(1); } Periodo newObj = obj as Periodo; if (newObj != null) { return(this.FechaInicio.CompareTo(newObj.FechaInicio)); } else { throw new ArgumentException("El objeto es incorrecto"); } }