summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0122-24.cs
blob: fb641992977f98c1b21dd23de5cf76f18b0992b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// CS0122: `Foo.this[int]' is inaccessible due to its protection level
// Line: 14

using System;
	
public class Foo {
	private int this[int index] { get { return index; } }
}
	
public class Bar {
	public static void Main ()
	{
		Foo foo = new Foo ();
		Console.WriteLine (foo[5]);
	}
}