You code for reading files is buggy, because FileData1.Split() is split by space while you must split by vbNewLine
try this one
Code:Try Dim File1Data As String() = IO.File.ReadAllLines(txtBoxXas1.Text) ' READ FILE #1 Dim File2Data As String() = IO.File.ReadAllLines(txtBoxXas2.Text) ' READ FILE #2 ' get the smallest upper bound to prevent 'out of range' exception inside the for...next Dim intUpperBound As Integer If File1Data.Length < File2Data.Length Then intUpperBound = File1Data.Length Else intUpperBound = File2Data.Length End If For x = 0 To intUpperBound - 1 If File1Data(x) <> File2Data(x) Then Else End If Next Catch ex As Exception MessageBox.Show(ex.ToString) End Try





Reply With Quote