摘要: 一 String和StringBuilder 少量的字符串操作不宜采用StringBuilder。 由于string是不可变得对象,对于string的叠加,每次操作都会生成一个新的string对象。所以针对大量string的操作时,我们会采用StringBuilde。但似乎很多人都知道这一点,所以只... 阅读全文
posted @ 2015-11-09 13:45 Bobwei 阅读(233) 评论(0) 推荐(0) 编辑
摘要: l Equality:如果两个对象是相同的类型,并且它们各自带有相同和等值的属性。(They are instances of the same type and if each of the fields in one object matches the values of the fields... 阅读全文
posted @ 2015-11-02 13:28 Bobwei 阅读(1075) 评论(0) 推荐(1) 编辑
摘要: 一、接口的作用:我们定义一个接口:public interface IBark{ void Bark();}1、 再定义一个类,继承于IBark,并且必需实现其中的Bark()方法public class Dog:IBark{ public Dog() {} public v... 阅读全文
posted @ 2015-10-26 16:44 Bobwei 阅读(833) 评论(0) 推荐(2) 编辑
摘要: 一、ArrayList 与 string、string[]数组的转换 1.ArrayList 转换为 string[] : ArrayList list = new ArrayList(); list.Add("aaa"); list.Add("bbb"); //转换成数组 str... 阅读全文
posted @ 2015-10-19 19:03 Bobwei 阅读(767) 评论(0) 推荐(0) 编辑
摘要: 在C#中,ArrayList,List都能够存储一组对象,那么这三者到底有什么样的区别呢。数组 数组在C#中是最早出现的。它在内存中是连续的存储的,所以索引速度很快,而且赋值与修改元素也很简单。可以利用偏移地址访问元素,时间复杂度为O(1);可以用折半查找法查找元素,效率高。 string[] s... 阅读全文
posted @ 2015-10-11 13:24 Bobwei 阅读(41112) 评论(1) 推荐(10) 编辑
摘要: JRE(Java Runtime Environment Java运行环境)包括Java虚拟机(JVM Java Virtual Machine)和Java程序所需的核心类库等,如果想要运行一个开发好的Java程序,计算机中只需要安装JRE即可。JDK(Java Development Kit Ja... 阅读全文
posted @ 2015-09-28 18:12 Bobwei 阅读(2375) 评论(0) 推荐(0) 编辑