1. 首页
  2. 数据库
  3. 其它
  4. 关于C#泛型列表ListT的基本用法总结

关于C#泛型列表ListT的基本用法总结

上传者: 2020-12-31 09:10:03上传 PDF文件 83.13KB 热度 13次
示例代码如下:namespace SampleListT{ class Program { static void Main(string[] args) {//using System.Collections.Generic; 命名空间中的List//using System.Collections; 命名空间中的ArrayList //都实现了列表集合,一个是泛形集合,一个是非泛型的//下面我们将Person对象加到集合中 Person p1 = new Person( “aladdin” , 20 );Person p2 = new Person(“zha
下载地址
用户评论