public static string[] RemoveDuplicatedItems(string[] array)
{
if ((array != null) && (array.Length > 0))
{
List<string> arrayTmp = new List<string>(array);
arrayTmp.Sort();
for (int i = arrayTmp.Count - 1; i > 0; i--)
{
if (arrayTmp[i].CompareTo(arrayTmp[i - 1]) == 0)
arrayTmp.RemoveAt(i);
}
return arrayTmp.ToArray();
}
else
return null;
}