/// <summary> /// Gets or sets the item on the given index. /// If the index passed to set is greater than Count, the SList.Add method will be called, /// otherwise we just define the item. /// You can pass an index greater than Count (I don't know why would you want that) to the get method, but never greater than Capacity. /// </summary> /// <param name="index"></param> /// <returns></returns> public T this[int index] { get { return(Data[index]); } set { if (index >= Count) { SList.Add(this, value); } else { Data[index] = value; } } }
public void OnAfterDeserialize() { Id = SList.GetId(); }
public int GetHashCode(SimpleList <T> obj) { return(SList.HashCode(obj)); }
public bool Equals(SimpleList <T> x, SimpleList <T> y) { return(SList.Compare(x, y)); }