2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git] / tests / gtest-etree-10.cs
blob6102c200b8d02b3ef33f405930953cd4b1428496
1 using System;
2 using System.Collections.Generic;
3 using System.Linq.Expressions;
5 class Foo<T>
7 public bool ContainsAll<U> (IEnumerable<U> items) where U : T
9 foreach (U item in items) {
10 Expression<Func<bool>> e = () => !Contains (item);
11 if (!e.Compile () ())
12 return false;
15 return true;
18 public bool Contains (T t)
20 return false;
24 class Program
26 static int Main ()
28 var x = new Foo<int> ();
29 return x.ContainsAll (new [] { 4, 6, 78 }) ? 0 : 1;