2010年1月22日

无法实现接口成员,因为它不是公共的-----------interface

摘要: //在使用Interface时 要注意: namespace GenericTest { interface IAnimals // 接口前不能添加出public关键字之外的修饰符 public interfact IAnimals 这样写也正确 { public void Eat(); //这样写法是错误的 void Eat(); //正确的,接口里的方法不能添加任何修饰符 void Sleep(); } class Person : IAnmals // Person Implem... 阅读全文

posted @ 2010-01-22 15:10 SonyXbox 阅读(520) 评论(0) 推荐(0) 编辑

导航