<?xml version="1.0" encoding="us-ascii"?>
<ErrorDocumentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ErrorName>CS1540</ErrorName>
  <Examples>
    <string>// CS1540: Cannot access protected member `Test.A.Property' via a qualifier of type `Test.A'. The qualifier must be of type `Test.B.C' or derived from it
// Line: 19

namespace Test
{
    public class A
    {
        protected int Property {
            get { return 0; }
        }
    }
 
    public class B : A
    {
        private sealed class C
        {
            public C (A a)
            {
                int test = a.Property;
                test++;
            }
        }
    } 
}</string>
    <string>// CS1540: Cannot access protected member `A.this[int]' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
// Line: 14

class A {
	protected int this [int i] { get { return i; } }
}

class B : A { }

class C : A {
	static int Main ()
	{
		B b = new B ();
		return b [0];
	}
}
</string>
    <string>// CS1540: Cannot access protected member `A.Test.get' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
// Line: 17

class A
{
	public object[] Test {
		set { }
		protected get { return null; }
	}
}

class B : A
{
}

class C : A
{
	public void Test2 (B b)
	{
		foreach (object o in b.Test) {
		}
	}
}
</string>
    <string>// CS1540: Cannot access protected member `A.del' via a qualifier of type `A'. The qualifier must be of type `B' or derived from it
// Line: 16

delegate int D ();

class A
{
	protected D del;
}

class B : A
{
    public static void Main ()
	{
		A b = new A ();
		var v = b.del ();
	}
}
</string>
    <string>// CS1540: Cannot access protected member `object.MemberwiseClone()' via a qualifier of type `anonymous type'. The qualifier must be of type `A' or derived from it
// Line: 9

class A
{
	public A ()
	{
		var x = new { s = "-" };
		x.MemberwiseClone();
	}
}
</string>
    <string>// 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 ();
        }
}</string>
    <string>// cs1540.cs: Cannot access protected member `A.n' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
// Line: 19

class A
{
        protected int n;
}
 
class B : A
{
}
 
class C : A
{
        static B b = new B ();
 
        static void Main ()
        {
                b.n = 1;
        }
}
</string>
    <string>// cs1540-4.cs: Cannot access protected member `A.n()' via a qualifier of type `A'. The qualifier must be of type `B' or derived from it
// Line: 14

class A
{
        protected void n () { }
}

class B : A
{
        public static void Main ()
	{
		A b = new A ();
		b.n ();
	}
}



</string>
    <string>// cs1540.cs: Cannot access protected member `A.n' via a qualifier of type `B'. The qualifier must be of type `C.N' or derived from it
// Line: 12

class A {
	protected int n = 0;
}

class B : A { }

class C : B {
	class N {
		static internal int foo (B b) { return b.n; }
	}
	public static int Main () {
		return N.foo (new B ());
	}
}
</string>
    <string>// cs1540-6.cs: Cannot access protected member `A.A(A)' via a qualifier of type `A'. The qualifier must be of type `B' or derived from it
// Line: 25

public class A {
	public A ()
	{
	}

	protected A (A a)
	{
	}
}

public class B : A {
	public B () : base ()
	{
	}
	
	public B (A a) : base (a)
	{
	}
	
	public A MyA {
		get {
			A a = new A (this);
			return a;
		}
	}
}
</string>
    <string>// cs1540-7.cs: Cannot access protected member `A.Test' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
// Line: 17

class A
{
    protected object[] Test { get { return null; } }
}

class B : A
{
}

class C: A
{
    public void Test2 (B b)
    {
        foreach (object o in b.Test)
        {
        }
    }

}
</string>
    <string>// cs1540-8.cs: Cannot access protected member `A.f' via a qualifier of type `A'. The qualifier must be of type `B' or derived from it
// Line: 9

class A {
	protected int f { get { return 1; } }
}

class B : A {
         int baz () { return new A().f; }
   }
 
</string>
    <string>// CS1540: Cannot access protected member `A.Test(int)' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
// Line: 28
using System;

public abstract class A
{
	protected virtual void Test (int a)
	{ }

	public void Test ()
	{ }
}

public class B : A
{
	protected override void Test (int a)
	{
		base.Test (a);
	}
}

public class C : A
{
	private B B;

	protected override void Test (int a)
	{
		B.Test (a);
		base.Test (a);
	}
}

class X
{
	static void Main ()
	{ }
}
</string>
    <string>// cs1540.cs: Cannot access protected member `A.n' via a qualifier of type `A'. The qualifier must be of type `B' or derived from it
// Line: 14

class A
{
    protected int n;
}

class B : A
{
    public static void Main ()
	{
		A b = new A ();
		b.n = 1;
	}
}
</string>
  </Examples>
</ErrorDocumentation>