The list<t> in C # itself provides a lot of interfaces to make your code very neat. A lot of me also see from the code written by other programmers in the project, learn to record a bit ~
The details of course are to go to the official Help document: Https://msdn.microsoft.com/zh-cn/library/6sh2ey19 (v=vs.110). aspx
The simplest few add,clear,contain will not say more, speak a few useful:
Sorts sort ().
This has been specifically said before, can look this way: http://blog.51cto.com/13638120/2084838
Reverse order reverse ().
This is to flip the list order, generally with sort
3.ToArray ()
Transfer to a group, commonly used
4.Select ()
This is to get the data from the original list and project it into a new listing, which can be a parameter in the original table, and the two-list T doesn't have to be always, like
Class a{float b;} list<a> list = new list<a> (); list<b> NewList = list. Select (a = A.B);
4.Max ()
Returns the maximum value of the list, if T is a numeric value
5.Average ()
Returns the average of the data in the list, if T is a numeric value.
...
Welcome to Supplement
Several common functions of the List<t> class "Unity practical Skills"