C # first note --- about list,
-> List <T> linear set, variable-length Array
-> Add () AddRange () Insert ()
Add an element list. Add ("zhangsan ");
Add a group of elements
String [] temArr = {"Zhang San", "Li Si", "Wang Wu "};
List. AddRange (temArr );
Insert an element list. Insert (1, "Insert element ");
-> Delete Remove (T) RemoveAt (int)
Delete A value: list. Remove ("Zhang San ");
Delete the specified value: list. RemoveAt (0 );
Delete list. RemoveRange (3, 2) of count elements from subscript index)
-> The modification can be modified like an array. // list [9] = '123 ';
-> Query bool Contains (T) IndexOf ()
Find returns the First Matching Element in the entire List.
-> Traverse
Foreach (type temporary variable in set)
{
Use temporary variables for processing
}
-> Simulated queue: first-in-first-out
List. Add ()
List [I] Output
List. ReamoveAt (0) remove existing data
-> Simulated Stack: first-in and later-out (cup and Oreo)
List. Add ()
List [list. Count-1]
List. RemoveAt (list. Count-1) remove existing data