string[] strArr = { "a", "b", "c", "d" };
bool exists = ((System.Collections.IList)strArr).Contains("a");
C# 判断字符是否在字符串数组中
离神越近,感觉自己越渺小。
string[] strArr = { "a", "b", "c", "d" };
bool exists = ((System.Collections.IList)strArr).Contains("a");