这里的任何人都可以帮助我
输入文件
Type Reference
WIN 00001
WIN 00001
WIN 00001
MAC 00001
MAC 00001
基本上我需要比较前 3 个字符是否不相等
首选输出将是
类型参考
WIN 00001
WIN 00001
WIN 00001
下面的代码
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