//删除字符串组中相同元素,并删除值为空的元素
public static string[] GetUnique(string[] strArr)
{
System.Collections.Specialized.NameValueCollection name = new System.Collections.Specialized.NameValueCollection();
foreach (string s in strArr)
{
if (s != "")
{
name[s] = s;
}
}
return name.AllKeys;
}
public static string[] GetUnique(string[] strArr)
{
System.Collections.Specialized.NameValueCollection name = new System.Collections.Specialized.NameValueCollection();
foreach (string s in strArr)
{
if (s != "")
{
name[s] = s;
}
}
return name.AllKeys;
}