访问:
1.list[index],下标index从0开始
增加:
1.list.Add(T t),T为存储类型,将数据 t 存入链表末尾
2.list.AddRange(IEnumerable
3.public void Insert(int index, T item);
public void InsertRange(int index, IEnumerable
查找:
1.list.BinarySearch(T item),二分查找,查找数据 item 在列表中的位置,下标从 0 开始,有重载
2.public bool Contains(T item);查找是否包含 item
3.public List
例:list_int.FindAll(a => a > 0),列表类型为 int ,寻找 list_int 中所有满足值 大于0 的值所产生的列表。
4.public T Find(Predicate
5. public int FindIndex(Predicate
public int FindIndex(int startIndex, Predicate
public int FindIndex(int startIndex, int count, Predicate
6.public T FindLast(Predicate
public int FindLastIndex(Predicate
public int FindLastIndex(int startIndex, Predicate
public int FindLastIndex(int startIndex, int count, Predicate
7. public int IndexOf(T item, int index, int count);
public int IndexOf(T item, int index);
public int IndexOf(T item); index开始下标,count查找个数,item查找对象
8.public int LastIndexOf(T item);
public int LastIndexOf(T item, int index);
public int LastIndexOf(T item, int index, int count); last
9.public List
删除:
1.public void Clear();
2.public int RemoveAll(Predicate
3.public bool Remove(T item);
4.public void RemoveAt(int index);
5.public void RemoveRange(int index, int count);