class B : A
{
void F()
{
A a = new A();
B b = new B();
a.x = 10; // Error
b.x = 10; // OK
}
}
这里的class B : A 是什么意思啊? - - 不要笑我哦
...全文
63310打赏收藏
class b:a 是什么意思啊?
class A { protected int x = 123; } class B : A { void F() { A a = new A(); B b = new B(); a.x = 10; // Error b.x = 10; // OK } } 这里的class B : A 是什么意思啊? - - 不要笑我哦