using System.Collections;
public class Class1
{
public static void Main()
{
int[] zArray = { 1, 2, 3, 1, 2, 3, 1, 2, 3 };
Predicate<int> match = new Predicate<int>(MethodA<int>);
int[] answers = Array.FindAll(zArray, match);
foreach (int answer in answers)
{
Console.WriteLine(answer);
}
Console.ReadKey();
}
public static bool MethodA<T>(T number) where T : IComparable
{
int result = number.CompareTo(3);
return result == 0;
}
}