How to get distinct characters?

string code = "AABBDDCCRRFF";
string answer = new String(code.Distinct().ToArray());

Leave a Comment