SortedDictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Contains Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether the ICollection<T> contains a specified value.
virtual bool System.Collections.Generic.ICollection<TValue>.Contains(TValue item) = System::Collections::Generic::ICollection<TValue>::Contains;
bool ICollection<TValue>.Contains (TValue item);
abstract member System.Collections.Generic.ICollection<TValue>.Contains : 'Value -> bool
override this.System.Collections.Generic.ICollection<TValue>.Contains : 'Value -> bool
Function Contains (item As TValue) As Boolean Implements ICollection(Of TValue).Contains
Parameters
- item
- TValue
The object to locate in the ICollection<T>.
Returns
true
if item
is found in the ICollection<T>; otherwise, false
.
Implements
Remarks
Implementations can vary in how they determine equality of objects; for example, List<T> uses Default, whereas SortedDictionary<TKey,TValue> allows the user to specify the IComparer<T> implementation to use for comparing keys.
This method is an O(n
) operation, where n
is Count.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om