A collection of commonly used C #

Array disadvantages: fixed length. Thus the introduction of the use of the set.

Note: The generic collections safer and higher performance.

A corresponding set of common generic

① dynamic array ArrayList List <T>

Properties common methods: Add Clear Contains IndexOf Insert Remove Sort

②哈希表Hashtable   Dictionary<TKey,TValue>

Properties common methods: Add Clear ContainsKey ContainsValue Remove

③ ordered list SortedList SortedList <TKey, TValue> 

Properties common methods: Add Clear ContainsKey ContainsValue GetByIndex GetKey Remove

④ stack Stack Stack <T>

Properties common methods: Clear Contains Peek Pop Push ToArray

⑤ queue Queue Queue <T>

Properties common methods: Clear Contains Dequeue Enqueue ToArray

⑥ point array BitArray  

Properties common methods: And Get Not Or Set SetAll Xor 

 

Guess you like

Origin www.cnblogs.com/1016391912pm/p/11616729.html