在列表中找到项目使用C# [英] Finding an item in a List<> using C#

查看:50
本文介绍了在列表中找到项目使用C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含对象集合的列表。

I have a list which contains a collection of objects.

如何在此列表中的 object.Property == myValue 中搜索项目?

How can I search for an item in this list where object.Property == myValue?

推荐答案

List.Find ??

我认为我们需要有关您的更多信息在提供真正有用的答案之前,它已经完成了,为什么失败了。

I think we need more information on what you've done, and why it fails, before we can provide truly helpful answers.

这篇关于在列表中找到项目使用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆