C#集合 [英] C# Collections
本文介绍了C#集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在不使用query(Linq)和for循环的情况下从集合中获取特定项目.....
How to take a specific item from a collection without using query(Linq) and for loop.....
推荐答案
所有答案都可以找到 ^ ]
All your answers can be found here[^]
List<int> coll = new List<int> { 3, 6, 8, 2, 9, 1 };
int searchNo = 8;
int result = coll.Find(delegate(int item)
{
return searchNo == item;
});
Console.WriteLine(result);
这篇关于C#集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文