10 2015 档案
摘要:一、接口的作用:我们定义一个接口:public interface IBark{ void Bark();}1、 再定义一个类,继承于IBark,并且必需实现其中的Bark()方法public class Dog:IBark{ public Dog() {} public v...
阅读全文
摘要:一、ArrayList 与 string、string[]数组的转换 1.ArrayList 转换为 string[] : ArrayList list = new ArrayList(); list.Add("aaa"); list.Add("bbb"); //转换成数组 str...
阅读全文
摘要:在C#中,ArrayList,List都能够存储一组对象,那么这三者到底有什么样的区别呢。数组 数组在C#中是最早出现的。它在内存中是连续的存储的,所以索引速度很快,而且赋值与修改元素也很简单。可以利用偏移地址访问元素,时间复杂度为O(1);可以用折半查找法查找元素,效率高。 string[] s...
阅读全文

浙公网安备 33010602011771号