/// <summary> /// ICloneable implementation. /// Idem <see cref="ArrayList">ArrayList</see> /// </summary> /// <returns>Cloned object.</returns> public object Clone() { SortableList Clone = new SortableList(_Comparer, _List.Capacity); Clone._List = (ArrayList)_List.Clone(); Clone._AddDuplicates = _AddDuplicates; Clone._IsSorted = _IsSorted; Clone._KeepSorted = _KeepSorted; return(Clone); }
/// <summary> /// Object.Equals() override. /// </summary> /// <returns>true if object is equal to this, otherwise false.</returns> public override bool Equals(object O) { SortableList SL = (SortableList)O; if (SL.Count != Count) { return(false); } for (int i = 0; i < Count; i++) { if (!SL[i].Equals(this[i])) { return(false); } } return(true); }