📅  最后修改于: 2022-03-11 14:49:02.707000             🧑  作者: Mango
using System;
using System.Collections.Generic;
var data = new List { 1, -2, 3, 0, 2, -1 };
Predicate isPositive = delegate(int val) { return val > 0; };
var filtered = data.FindAll(isPositive);
Console.WriteLine(string.Join(",", filtered));