How does the Contains() method work in a List<T>?
Contains(item) checks whether the item exists in the list. It uses Equals() internally.
Example:
Follow:
bool exists = list.Contains(10);
Note: For custom objects, override Equals() and GetHashCode().