Contains Method

LinkedList<T>.Contains Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Determines whether a value is in the LinkedList<T>.

Namespace:  System.Collections.Generic
Assembly:  System (in System.dll)

public bool Contains(
	T value
)

Parameters

value
Type: T
The value to locate in the LinkedList<T>. The value can be null for reference types.

Return Value

Type: System.Boolean
true if value is found in the LinkedList<T>; otherwise, false.

Implements

ICollection<T>.Contains(T)

This method performs a linear search; therefore, this method is an O(n) operation, where n is Count.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft