string[] str = {"a","b","c","d"}; string s = "e"; Response.Write(System.Array.IndexOf(str, s).ToString());
有将返回该字符串在数组中的索引。
无则返回-1;
转载于:https://www.cnblogs.com/_zjl/archive/2011/04/12/2013317.html