.net - C# allows reversed reference to nested class? -
is bug in microsoft c# compiler, or syntax serve purpose i'm not aware of?
class p1 { class p2 : p1 { class p3 : p2 { void foo() { p3 p3 = p2.p3; p2 p2 = p3.p2; // ?!? } }; }; }; edit: should mention compiles fine in vs2010.
this works because nested classes inherit class they're nested in.
p3 p2, p1, has nested p2.
Comments
Post a Comment