ImmutableArray<T>.Contains Method

Definition

Overloads

Contains(T)

Determines whether the specified item exists in the array.

Contains(T, IEqualityComparer<T>)

Determines whether the specified item exists in the array.

Contains(T)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Determines whether the specified item exists in the array.

C#
public bool Contains(T item);

Parameters

item
T

The item to search for.

Returns

true if the specified item was found in the array; otherwise false.

Implements

Applies to

.NET 10 y otras versiones
Producto Versiones
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0

Contains(T, IEqualityComparer<T>)

Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs
Source:
ImmutableArray_1.cs

Determines whether the specified item exists in the array.

C#
public bool Contains(T item, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);

Parameters

item
T

The item to search for.

equalityComparer
IEqualityComparer<T>

The equality comparer to use in the search. If null, Default is used.

Returns

true if an equal value was found in the array; false otherwise.

Applies to

.NET 10 y otras versiones
Producto Versiones
.NET 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)