Public Sub Alphabetize(ByVal file As String)
Dim streamReader As New IO.StreamReader(file)
Dim text As String = streamReader.ReadToEnd
streamReader.Close()
Dim line As String
Dim lines() As String = Split(text, Environment.NewLine)
lines.Sort(lines)
Dim streamWriter As New IO.StreamWriter(file)
For Each line In lines
streamWriter.WriteLine(line)
Next
streamWriter.Close()
End Sub
mutant said:What does not work? What line? Does it throw an error or simply doesnt do what you want it to do?
If you look back on your length of file thread i included an example an how to sort an array. The real easy way too. It will alphabetize.PureSc0pe said:There are no errors, it just doesnt do anything. I want it to alphabetize the text file and it is not doing anything.