LinkedList<T>.Contains(T) 메서드
정의
값이 LinkedList<T>에 있는지 여부를 확인합니다.Determines whether a value is in the LinkedList<T>.
public:
virtual bool Contains(T value);
public bool Contains (T value);
abstract member Contains : 'T -> bool
override this.Contains : 'T -> bool
Public Function Contains (value As T) As Boolean
매개 변수
- value
- T
LinkedList<T>에서 찾을 값입니다.The value to locate in the LinkedList<T>. 참조 형식에 대해 값은 null
이 될 수 있습니다.The value can be null
for reference types.
반환
true
가 value
에 있으면 LinkedList<T>이고, 그렇지 않으면 false
입니다.true
if value
is found in the LinkedList<T>; otherwise, false
.
구현
예제
이 메서드를 포함 하는 예제는 클래스를 참조 하세요 LinkedList<T> .For an example that includes this method, see the LinkedList<T> class.
설명
이 메서드는 선형 검색을 수행 합니다. 따라서이 메서드는 O ( n
) 연산입니다 n
. 여기서는 Count 입니다.This method performs a linear search; therefore, this method is an O(n
) operation, where n
is Count.