Filter list contents with predicate
using System;
using System.Collections.Generic;
var data = new List<int> { 1, -2, 3, 0, 2, -1 };
var predicate = new Predicate<int>(isPositive);
var filtered = data.FindAll(predicate);
Console.WriteLine(string.Join(",", filtered));
bool isPositive(int val)
{
return val > 0;
}