泛型常用的情况是两大类List<string>和List<T>
Add:很简单,直接Add就行了
Remove:
举例:
List<string>的Remove
1. List<string> list=new List<string>{"aa","aa","bb","cc"};
list.remove("aa"); 结果:list=new List<string>{"aa","bb","cc"};
精解:list只会把第一个符合条件的删掉
2.List<string> list=new List<string>{"aa","aa","bb","cc"};
list.remove("bb");结果:list=new List<string>{"aa","aa","cc"};
List<T>的RemoveAll
List<T> List_T=new List<T>。。。。
List_T.RemoveAll(t=>t.**.Equals(**)); 这样就会把符合条件的所有集合清除