code_junkie

Display unique characters only in a textbox

Nov 12th, 2011
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. new string("AaBbcdCDEb".ToLower().Distinct().ToArray());
  2.  
  3. string input = "AABBCCDD";
  4. string output = string.empty;
  5. foreach(char c in input)
  6. if (!output.Contains(c))
  7. output += c;
Add Comment
Please, Sign In to add comment