string x = "AABBCDEFF";
string result = "";
foreach (char value in x)
{
if (result.IndexOf(value) == -1)
{
result += value;
}
}
x= result;