摘要: http://www.7747.net/kf/201009/75124.htmlC#中new和override是继承中经常用到的两个关键字,但是往往有时候容易把这两个关键字的作用搞混淆。newC# new关键字表示隐藏,是指加上new关键字的属性或函数将对本类和继承类隐藏基类的同名属性或函数 public class A{ public virtual void Method() { Console.WriteLine("This Method in Class A!"); }}public class B : A{ public new void Method() { C 阅读全文
posted @ 2011-04-29 12:03 hailiang2013 阅读(134) 评论(0) 推荐(0)