複製するのは本当に簡単ですが、出力は奇妙です。
期待される出力は「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);
}
}