c# contains
C#List <T> .Contains()方法 (C# List<T>.Contains() Method)
List<T>.Contains() method is used to check whether list contains a specified element or not.
List <T> .Contains()方法用于检查list是否包含指定的元素。
Syntax:
句法:
bool List<T>.Contains(T item);
Parameter: It accepts an item of type T.
参数:接受类型T的项目 。
Return value: It returns a Boolean value. true if list contains the item, false if list does not contain the item.
返回值:返回一个布尔值