Come detto, non starei a complicarmi la vita così... Basterebbe una cosa del tipo:
codice:Import System.IO Import System.Collections.Generic ... Dim fileName As String = .... Dim out As New List<String>() Using fs As New StreamReader(fileName) While True Dim r1 As String = fs.ReadLine() Dim r2 As String = fs.ReadLine() If r2 Is Nothing Then Exit While Dim s1() As String = r1.Split(";"c) Dim s2() As String = r2.Split(";"c) If CInt(s1(4))+CInt(s2(4)) < numeroMagico Then out.Add(r1) out.Add(r2) End If End While End Using Using sw As New StreamWriter(fileName) For Each s In out sw.WriteLine(s) End For End Using