Hello again this is an update of the code I submitted this morning. Anyway I now made it into a small little program.
You can give it a source and remove duplicates that is sorted or unsorted
You can also copy or save your output. Hope you like it.
Comments and suggests welcome.
Last edited by BenJones; Jul 6th, 2012 at 03:37 PM.
When performing such tedious operations I like to rely on LINQ rather than Loops. You should really look into LINQ, its quite powerful
Code:
'remove duplicates
Dim cleanList As List(Of String) = IO.File.ReadAllLines("[FILENAME]").Distinct.ToList
'remove duplicates + null lines
Dim cleanList As List(Of String) = IO.File.ReadAllLines("[FILENAME]").Where(Function(line) Not line.Equals(String.Empty)).Distinct.ToList