string[] input = new string[]{"one","two","tree","tree","one","four"}; input = input.ToList().Distinct().ToArray();
CString StrArray; StrArray.Add("aa"); StrArray.Add("bb"); StrArray.Add("cc"); bool flag =0 ; CString NewStrToAdd = "dd" for(int y = 0 ;y < StrArray.GetCount(); y++) { if(NewStrToAdd == StrArray.ElementAt(y)) { flag = 1; break; } } if(flag == 0) { StrArray.Add(NewStrToAdd ); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)