I've a notepad file that has the following format:
at-2017@yahoo.com
at-2017@yahoo.com
at-2018@yahoo.com
at-2018@yahoo.com
I require the following distinct output:
at-2017@yahoo.com
at-2018@yahoo.com
Tried the following code but it doesn't get distinct values:
List<string> lst = new List<string>();
foreach (string line in File.ReadLines(values))
{
line.Distinct().ToString();
lst.Add(line);
}
I know, this may seem stupid and guessing, missed something here.