/// <summary> /// 删除数组中的重复项 /// </summary> /// <param name="values"></param> /// <returns></returns> public static string[] RemoveDup(string[] values) { List<string> list = new List<string>(); for (int i = 0; i < values.Length; i++)//遍历数组成员 { if (!list.Contains(values[i])) { list.Add(values[i]); }; } return list.ToArray(); }