Question How do i read through a textfile line by line checking for and removing duplicate val

htconex

Member
Joined
May 16, 2012
Messages
7
Programming Experience
5-10
How do i read through a textfile line by line checking for and removing duplicate values??
Thank you :)
 
Simplest option:
Private Sub RemoveDuplicateLinesFromFile(filePath As String)
    IO.File.WriteAllLines(filePath, IO.File.ReadAllLines(filePath).Distinct())
End Sub
 
Back
Top