摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 /*---------------------------------------------------------------------------- 7 * 显式实现接口: ... 阅读全文
posted @ 2016-04-06 14:33 C/C++/Python/Java 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace 接口_隐式接口实现 7 { 8 // 定义接口1 : IChineseGreetin 阅读全文
posted @ 2016-04-06 14:20 C/C++/Python/Java 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Person Program 阅读全文
posted @ 2016-04-06 13:58 C/C++/Python/Java 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 3 namespace 类_使用新成员隐藏基类成员 4 { 5 // 基类 : Animal 6 public class Animal 7 { 8 // 基类的普通方法Eat(), 并未用Virtual修饰 9 public void Eat() 10 { 11 阅读全文
posted @ 2016-04-06 09:53 C/C++/Python/Java 阅读(498) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 3 namespace 类_阻止派生类重写虚成员 4 { 5 // 声明一个抽象类Animal(用abstract关键字声明抽象类) 6 public abstract class Animal 7 { 8 // 基类的抽象方法Voice(); 功能在派生类实现 阅读全文
posted @ 2016-04-06 09:41 C/C++/Python/Java 阅读(404) 评论(0) 推荐(0) 编辑