示例#1
0
 /// <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;
         }
     }
 }
示例#2
0
 public void OnAfterDeserialize()
 {
     Id = SList.GetId();
 }
示例#3
0
 public int GetHashCode(SimpleList <T> obj)
 {
     return(SList.HashCode(obj));
 }
示例#4
0
 public bool Equals(SimpleList <T> x, SimpleList <T> y)
 {
     return(SList.Compare(x, y));
 }