2 using System
.Collections
.Generic
;
4 namespace ExtensionTest
.Two
6 public delegate TResult AxFunc
<in T1
, out TResult
> (T1 first
);
8 public static class Extensions
10 public static bool Contains
<T
> (this IEnumerable
<T
> source
, T item
)
15 public static bool All
<T
> (this IEnumerable
<T
> source
, AxFunc
<T
, bool> predicate
)
23 namespace ExtensionTest
25 using ExtensionTest
.Two
;
27 public static class MyClass
29 public static bool IsCharacters (this string text
, params char[] chars
)
31 return text
.All (chars
.Contains
);
34 public static bool Contains (this string text
, string value, StringComparison comp
)
36 return text
.IndexOf (value, comp
) >= 0;
39 public static void Main ()