string[] s = new string[4] {"111","222","333" ,"444"}; string s1 = "3335"; //判断字符串的前几位在另一个字符串数组中第一次出现的索引位置 index = Array.IndexOf(s, s1.Substring(0, 2));