[corlib] Fix a few NSLogWriter issues. (#13799)
[mono-project.git] / mcs / tests / gtest-etree-10.cs
blobc0a9a07c8bdf53fcddf469ea7f22ae445547ad4c
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 public static int Main ()
28 var x = new Foo<int> ();
29 return x.ContainsAll (new [] { 4, 6, 78 }) ? 0 : 1;