How to use linq and string.EndsWith(<1 of N items in an array>)
.net, c#, linq
Solution
if (a.Any(yourString.EndsWith))
{
//your string ends with one of those endings.
}
Problem
I have an expression as above in the title. Is it possible to use linq to iterate through an array and evaluate if true or not. example `string[] a = {"es","ag"}` ``` if (string.EndsWith(<1 of N items in a>)==true){//do something} ```