Say I have a class Customer which has a property FirstName. Then I have a List.
Customer
FirstName
List
Can LINQ be used to find if th
LINQ defines an extension method that is perfect for solving this exact problem:
using System.Linq; ... bool has = list.Any(cus => cus.FirstName == "John");
make sure you reference System.Core.dll, that's where LINQ lives.