Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-exmethod-16.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1f07db46b72eb59be20e9b000620b2180feb7266 (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"; }
	}
	
	static void Main (string [] args)
	{
		Program p = new Program ();
		p [0].Extension ();
		p.Property.Extension ();
		p.e.Extension ();
	}
}