summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0668.cs
blob: 9ab3e251a6ca186ddb4af5be7c5a808ea843a862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// CS0668: Two indexers have different names; the IndexerName attribute must be used with the same name on every indexer within a type
// Line: 

using System.Runtime.CompilerServices;
class A {
	[IndexerName ("Blah")]
	int this [int a] {
	get { return 1; }
	}
	
	[IndexerName ("Foo")]
	int this [string b] {
	get { return 2; }
	}
	
        public static int Main ()
        {
		int a = 5;
		
		if (!(a is object))
			return 3;

		return 0;
        }
}