summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-exmethod-16.cs
blob: 8558bc6feb7f6c8121478dac939b074b4e775783 (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
29
30
31
32
33
34
35
36
37
using System;

static class Rocks
{
	public static bool Extension (this string self)
	{
		return true;
	}
	
	public static bool Extension (this D self)
	{
		return true;
	}
}

delegate string D ();

class Program
{
	event D e;
	
	public string this [int index] {
		get { return "HelloWorld"; }
	}
	
	public string Property {
		get { return "a"; }
	}
	
	public static void Main (string [] args)
	{
		Program p = new Program ();
		p [0].Extension ();
		p.Property.Extension ();
		p.e.Extension ();
	}
}