1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// CS0122: `C.this[int]' is inaccessible due to its protection level // Line: 6 using System; using System.Collections; class C { protected string this [int i] { set {} } } public class D { void Foo () { C c = new C (); c [0] = null; } }