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

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

namespace NameCollisionTest
{
	class Data
	{
		public int Value;
	}

	static class Ex
	{
		public static IEnumerable<TR> Foo<T, TR> (this IEnumerable<T> t, Func<T, TR> f)
		{
			yield return f (t.First ());
		}
	}

	public class C
	{
		public static void Main ()
		{
			Data [] i = new Data [0];
			var prods = from pe in i.Foo (pe => pe.Value) where pe > 0 select pe;
		}
	}
}