Hi,
Use the
List(T).Contains method[
^]
For example:
bool b = integerList.Contains(2);
Or, use the
Enumerable.Any method[
^] if you want to use a lambda expression.
For example, if you have a list of cars.
bool b = carList.Any(a => a.Id == 1001);
Hope this helps.