summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-iter-31.cs
blob: 5bd2ea079a9adbd9d98042f8f6b0bdbc06ee4ab0 (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
using System.Collections.Generic;
using System.Linq;

class B
{
	public object Foo (object obj)
	{
		return null;
	}
}

class C
{
	B ctx = new B ();

	public static void Main ()
	{
		foreach (var c in new C ().Test ()) {			
		}
	}

	IEnumerable<ushort> Test ()
	{
		string[] s = new[] { "a", "b", "c" };

		var m = s.Select (l => ctx.Foo (l)).ToArray ();

		yield break;
	}
}