需要检查列表中是否包含具有属性值为X的项。 一直使用FirstOrDefault并与null进行比较: searchItems.FirstOrDefault(si => si.ID == 99) == null 有更好的方法来做这件事吗? 我在使用Contains时无法避免语法错误。谢谢。