ArrayExtensions.Contains<T>
Extension Method in ArrayExtensions
Declaration
public static bool Contains<T>(this T[] array, T element)
where T : IEquatable<T>Description
Checks if the array contains the given element.
Type Parameters
| T | The type of the array. |
Parameters
| array | The array to search in. |
| element | The element to search for. |
Returns
| bool | True if the array contains the element, false otherwise. |
Overload
Declaration
public static bool Contains<T>(this T[] array, Predicate<T> predicate)Description
Checks if the array contains an element that satisfies a predicate.
Type Parameters
| T | The type of the array. |
Parameters
| array | The array to search in. |
| predicate | The predicate to use. |
Returns
| bool | True if any element satisfies the predicate. |