========c#集合泛型List<T>==========

1:List<T>的使用

1-1:
System.Collections.Generic
List<Student> students = new List<Student>();
2:遍历List<Student>集合
2-1:
foreach (Student stu in students)
{
       Console.WriteLine(stu.Name);
}
2-2:

Nearth===014/c#集合泛型List

3:使用泛型集合List<T>
3-1:
List<T>的访问方式与ArrayList相同

Nearth===014/c#集合泛型List


学习累呀·····真的累呀······················

相关文章: