Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs1540-2.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 95c6961b3c513ebd2deaf21f55e892e54676f2d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// cs1540-2.cs : 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 ();
        }
}