Moved ProviderCollectionTest.cs from System assembly to System.Configuration.
[mono.git] / mcs / tests / gtest-anon-41.cs
1 using System;\r
2 using System.Collections.Generic;\r
3 using System.Linq;\r
4 \r
5 // Tests caching of closed generic anonymous delegates\r
6 \r
7 static class C\r
8 {\r
9         public static decimal Average<TSource> (this IEnumerable<TSource> source, Func<TSource, decimal> selector)\r
10         {\r
11                 return source.Select (selector).Average<decimal, decimal, decimal> ((a, b) => a + b, (a, b) => a / b);\r
12         }\r
13 \r
14         static TResult Average<TElement, TAggregate, TResult> (this IEnumerable<TElement> source,\r
15                 Func<TAggregate, TElement, TAggregate> func, Func<TAggregate, TElement, TResult> result)\r
16                 where TElement : struct\r
17                 where TAggregate : struct\r
18                 where TResult : struct\r
19         {\r
20                 throw new InvalidOperationException ();\r
21         }\r
22 \r
23         public static void Main ()\r
24         {\r
25         }\r
26 }\r
27 \r