复制真的很简单,输出很奇怪;
预期输出为“bbb bbb” 实际输出为“aaa bbb”
有没有人对这种行为有任何 MSDN 解释?我找不到任何东西。
((a)new b()).test();
new b().test();
public class a
{
public virtual void test(string bob = "aaa ")
{
throw new NotImplementedException();
}
}
public class b : a
{
public override void test(string bob = "bbb ")
{
HttpContext.Current.Response.Write(bob);
}
}