public int CompareTo(IGroup other) { if (ReferenceId == null || other == null || other.ReferenceId == null) { return(-1); } else { return(ReferenceId.CompareTo(other.ReferenceId)); } }