摘要: 在C#中数组,ArrayList,List都能够存储一组对象,那么这三者到底有什么样的区别呢。 数组 数组在C#中最早出现的。在内存中是连续存储的,所以它的索引速度非常快,而且赋值与修改元素也很简单。 [csharp] view plain copy <span style="font-family 阅读全文
posted @ 2017-08-15 17:05 小刀lcy 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 声明: 1、List<T> mList = new List<T>(); T为列表中元素类型,现在以string类型作为例子 E.g.:List<string> mList = new List<string>();2、List<T> testList =new List<T> (IEnumerab 阅读全文
posted @ 2017-08-15 16:47 小刀lcy 阅读(8660) 评论(1) 推荐(0) 编辑