Reputation: 3954
I have two lists of strings in a C# program. One is a list of valid strings, the other is a list of directories:
string[] allDirs = Directory.GetDirectories(path);
string[] validEndings = new string[] { "ABC", "DEF" }; // for example
How can I write a Linq statement to get just the string values in allDirs
that end with any one of the values in validEndings
?
Upvotes: 1
Views: 876