System::Buffers::SearchValues class

SearchValues class

Provides an immutable, read-only set of values optimized for efficient searching. Values are stored in a hash set, so Contains() performs an average O(1) lookup.

template<typename T>class SearchValues : public System::Object
ParameterDescription
TThe type of the values to search for.

Methods

MethodDescription
Contains(T) constDetermines whether the specified value is contained in the set.
static Create(const ReadOnlySpan<T>&)Creates a SearchValues instance from the specified set of values.
SearchValues()Constructs an empty SearchValues instance.

See Also