If you have the following code:
Dim One As New System.IO.StreamReader("file # 1")
Dim Two As New System.IO.StreamReader("file # 2")
Dim Three As New StreamWriter("file # 3")
While One.Read And Two.Read
If Two.Read <> One.Read Then
Three.Write(Two.Read)
End If
End While
One.Close()
Two.Close()
File # 1 has:
1
2
3
File # 2 has:
1
2
3
4
5
6
I want to read from file 1 and file 2. Whenever the reading from file 2 doesnt match the reading from file 1, I want to start saving that reading in file 3. So, at the end, file 3 would have this:
4
5
6
When i run this, the form freezes and file 3 doesnt get updated. Can someone please let me know what i am doing wrong, or maybe have a better suggestion to solving the problem?!
thanks
Dim One As New System.IO.StreamReader("file # 1")
Dim Two As New System.IO.StreamReader("file # 2")
Dim Three As New StreamWriter("file # 3")
While One.Read And Two.Read
If Two.Read <> One.Read Then
Three.Write(Two.Read)
End If
End While
One.Close()
Two.Close()
File # 1 has:
1
2
3
File # 2 has:
1
2
3
4
5
6
I want to read from file 1 and file 2. Whenever the reading from file 2 doesnt match the reading from file 1, I want to start saving that reading in file 3. So, at the end, file 3 would have this:
4
5
6
When i run this, the form freezes and file 3 doesnt get updated. Can someone please let me know what i am doing wrong, or maybe have a better suggestion to solving the problem?!
thanks