摘要: 看一个例子:1 interface IFoo2 {3 string Message { get; }4 }则,1 IFoo obj = new IFoo("abd");将会报错:接口不能被实例化。如果: 1 class Foo : IFoo 2 { 3 readonly string name; 4 public Foo(string name) 5 { 6 this.name = name; 7 } 8 string IFoo.Message 9 {10 get11 {12 ... 阅读全文
posted @ 2013-07-25 17:17 SubmarineX 阅读(7160) 评论(0) 推荐(1) 编辑