METHOD
Array.FindAll
Returns an array of matching elements in source order. No matches produce an empty array. It does not remove elements from the source.
Formal Syntax & Structure
csharp syntaxcsharp
Array.FindAll(values, predicate)Working Example
Example Snippetcsharp
using System;Console.WriteLine(string.Join(",", Array.FindAll(new[] { 1, 2, 4, 3 }, n => n % 2 == 0))); // 2,4