string word = "I want to find the duplicate char in this line in asc order"; string hold = ""; for (int i=0; i< word.Length; i++) { for(int j=i+1; j< word.Length ; j++) { if(word[i].ToString() == " ") { break; } if(word[i] == word[j]) { hold = hold + word[i]; break; } } } Console.WriteLine(hold);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)