string[]RemoveSameElement(string[] source){
List<string> result = source.ToList();
result.Sort();for(int i =1; i < source.Length;){if(result[i]== result[i -1]){
result.RemoveAt(i);}else{
i++;}}return result.ToArray();}
string[]RemoveSameElement(string[] source){
Dictionary<int, StringInfo> d =newDictionary<int,StringInfo>();
List<StringInfo> temp =newList<StringInfo>();
List<string> result =newList<string>();for(int i =0; i < source.Length; i++){
d.Add(i,newStringInfo(source[i]));
temp.Add(d[i]);}
temp.Sort();for(int i =0; i < temp.Count;){if(temp[i]!=null){
temp.RemoveAt(i);}else{
i++;}}foreach(StringInfo i in temp){
result.Add(i.Value);}return result.ToArray();}// 通过这个StringInfo类来实现对string的引用classStringInfo:IComparable{publicStringInfo(stringvalue){
Value =value;}publicstring Value;publicintCompareTo(object obj){if(obj.GetType()==GetType()){return Value.CompareTo((obj as StringInfo).Value);}else{thrownewArgumentException("参数必须为StringInfo类型");}}}