标题中有上面的表达。是否可以使用linq遍历数组并评估是否为true。例string[] a = {"es","ag"}
if (string.EndsWith(<1 of N items in a>)==true){//do something}
if (a.Any(yourString.EndsWith))
{
//your string ends with one of those endings.
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句