摘要: 接口解释:接口只包含只有方法,属性,索引器(有参属性),事件四种成员。方法的实现是在实现接口的类中完成的。接口方法默认是public类型,不能显示指定方法的public类型。接口或抽象类都不能实例化。接口实现:接口实现分显示实现和隐示实现。//定义接口 interface IGraphic { float getArea(); }//隐士隐示实现接口 public class Rectangle : IGraphic { private float _width = 10; private float _height = ... 阅读全文
posted @ 2011-12-22 18:06 sdhht 阅读(1299) 评论(9) 推荐(0)