For backup. Here’s a brief idea Directory.GetFiles.Where Use lambda expressions to filter.
To be more specific, one is used in where. Endwith, and the other is used in where Regex.IsMatch Regular expression for.
For example, to filter out. JPG /. PNG /. TIFF /. BMP /. GIF files, the regular expression is: