For a class project I am supposed to search through the attached file, and write to a new file the years between 1789 and 2009 that are not present in the fifth field. What is my best bet for determining what years are not present?
So far I have this
I'm kind of stuck after that. :/Code:Dim justices() As String = IO.File.ReadAllLines("Justices.txt") Private Sub btnCreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreate.Click Dim queryAppointments = From line In justices Let year = line.Split(","c)(4) Select year Dim queryNoAppointments = From line In justices.Except(queryAppointments) End Sub End Class
Should I make an array of integer between 1789 and 2009, then search for every year in the file, then set a flag to false if not found; is there a simpler way to accomplish this using LINQ?
Thanks in advance for any help, I'm still shaky at best with my programming and fairly new.




Reply With Quote
