English(beta)
hfyb的Blog 页面正在加载中 .....

2006年11月28日

摘要: Class myclass(){ int a=10; static int b=20;}Class test(){ myclass A=new myclass(); A.a=10; //正确 A.b=20; //不能通过对象访问类中的静态成员 myclass.a=10; //不能通过类访问非静态成员 ... 阅读全文
posted @ 2006-11-28 14:02 hfyb 阅读(1011) 评论(0) 推荐(0) 编辑
摘要: 1 interface IControl 2 { 3 void paint(); //显式说明的接口成员不能被声明为虚拟的 4 } 5 Class Control:IControl 6 { 7 void IControl.paint 8 { 9 paintControl(); ... 阅读全文
posted @ 2006-11-28 13:30 hfyb 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 这是一个显式接口的实现,首先我们先来看代码: 1 interface IFoo 2 { 3 void Executr(); 4 } 5 interface IBar 6 { 7 void Executer(); 8 } 9 class Tester:IFoo,IBar10 {11 void IFoo.executer()12 {13 conso... 阅读全文
posted @ 2006-11-28 13:06 hfyb 阅读(413) 评论(0) 推荐(0) 编辑

导航