Anybody here can help me with this
Input file
Type Reference
WIN 00001
WIN 00001
WIN 00001
MAC 00001
MAC 00001
Basically I need to compare if the first 3 character that are not equal
preferred output will be
Type Reference
WIN 00001
WIN 00001
WIN 00001
Code below
Dim fh As StreamReader
Dim os as string
fh = new StreamReader("haggis.txt")
Dim s As String = fh.ReadLine()
While not s Is Nothing
os = s.Substring(0,3)
if os <> os then
Console.WriteLine("Write here")
else
end if
s = fh.ReadLine
End While
fh.Close()
End Sub
Declare a previousOS variable, and compare it with that.
e.g.