ArrayExtensions.Where<T>

Extension Method in ArrayExtensions

Declaration

public static T[] Where<T>(this T[] array, Predicate<T> predicate)

Description

Filters the array to only contain elements that satisfy a predicate.

Type Parameters

TThe type of the array.

Parameters

arrayThe array to filter.
predicateThe predicate to use.

Returns

T[]A new array with the filtered elements removed.