摘要:
interface用来声明接口1.只提供一些方法规约,不提供方法主体 2.方法不能用public abstract等修饰,无字段变量,无构造函数。 3.方法可包含参数 实现interface的类 1.与继承类的格式一致,如 public class Chinese:IPerson{} 2.必须实现i 阅读全文
posted @ 2016-09-23 17:43
每天来逛逛
阅读(204)
评论(0)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.Text; namespace Equal { using System; class Test { public static void Main() { Person p1 阅读全文
posted @ 2016-09-23 17:22
每天来逛逛
阅读(2730)
评论(0)
推荐(0)
摘要:
String 对象是不可改变的。每次使用 System.String 类中的方法之一时,都要在内存中创建一个新的字符串对象,这就需要为该新对象分配新的空间。在需要对字符串执行重复修改的情况下,与创建新的 String 对象相关的系统开销可能会非常昂贵。如果要修改字符串而不创建新的对象,则可以使用 S 阅读全文
posted @ 2016-09-23 16:45
每天来逛逛
阅读(8110)
评论(0)
推荐(0)

浙公网安备 33010602011771号