📅  最后修改于: 2022-03-11 14:48:53.242000             🧑  作者: Mango
// Single
string search = "testSearch";
List list = new List(); // Need to create a string list
string result = list.Single(s => s == search);
// Find all where meets the criteria
IEnumerable results = list.Where(s => s == search);
// Select first one
string result = list.First(s => s == search);