字符串数组是否包含某个字符
string[] elements = new string[50]; if (Array.IndexOf<string>(elements, "a" ) != -1 ) { //存在 //返回的值就是 "a" 在数组中的下标 } else{//不存在
} string[] elements = new string[50]; if (Array.IndexOf<string>(elements, "a" ) != -1 ) { //存在 //返回的值就是 "a" 在数组中的下标 } else{}