a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
23 lines
350 B
C#
23 lines
350 B
C#
// CS1540: Cannot access protected member `A.X()' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
|
|
// Line: 21
|
|
|
|
class A
|
|
{
|
|
protected virtual void X ()
|
|
{
|
|
}
|
|
}
|
|
|
|
class B : A
|
|
{
|
|
}
|
|
|
|
class C : A
|
|
{
|
|
static B b = new B ();
|
|
|
|
static void M ()
|
|
{
|
|
b.X ();
|
|
}
|
|
} |