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

gtest-iter-05.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cd4a15a99e1fd04276462a7796dc09abdd3767f4 (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
using System;
using System.Collections.Generic;

public class Test
{
	public static void Main ()
	{
		Foo<int> nav = new Foo<int> ();
		IEnumerable<int> t = TestRoutine<int> (new int [] { 1 }, nav);
		new List<int> (t);
	}

	public static IEnumerable<T> TestRoutine<T> (IEnumerable<T> a, Foo<T> f)
	{
		f.CreateItem<int> ();
		foreach (T n in a) {
			yield return n;
		}
	}

}
public class Foo<T>
{
	public void CreateItem<G> ()
	{
	}
}