📅  最后修改于: 2022-03-11 14:48:55.842000             🧑  作者: Mango
using System;
using System.Collections.Generic;
var words = new List { "falcon", "wood", "tree",
"rock", "cloud", "rain" };
Predicate hasFourChars = word => word.Length == 4;
var words2 = words.FindAll(hasFourChars);
Console.WriteLine(string.Join(',', words2));