C# 判断字符是否在字符串数组中

string[] strArr = { "a", "b", "c", "d" }; 
bool exists = ((System.Collections.IList)strArr).Contains("a");

posted @ 2021-12-20 16:14  蛟十五  阅读(1086)  评论(1编辑  收藏  举报