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

test-anon-72.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d396d29a601eeabecbafe408a67acaf395670bc3 (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
public class Test
{
	public delegate bool UnaryOperator(object self, out object res);
	public void AddOperator(UnaryOperator target) {}
	public bool TryGetValue(object self, out object value)
	{
		value = null;
		return false;
	}
    
	public static void Main ()
	{
	}
	
	void Foo ()
	{
		AddOperator (delegate(object self, out object res) {
			object value;
			if (TryGetValue(self, out value)) {
				res = value;
				if (res != null) return true;
			}
			res = null;
			return false;
		});
	}
}