这是 Microsoft C# 编译器中的错误,还是语法有我不知道的用途?
class P1
{
class P2 : P1
{
class P3 : P2
{
void Foo()
{
P3 p3 = this as P2.P3;
P2 p2 = this as P3.P2; // ?!?
}
};
};
};
编辑:我应该提到它在 VS2010 中编译得很好。