Eliminate Duplicate Charecters
string greet = "happynewyear";
string result = string.Empty;
List<char> lstchars = new List<char>();
for (int i = 0; i < greet.Length; i++)
{
char c = greet[i];
if (!lstchars.Contains(c))
{
lstchars.Add(c);
}
}
foreach (char c in lstchars)
{
result += c;
}
Console.WriteLine(result);
Console.ReadLine();