我有一个文本文件,如下所示
O "ABC123.GEO"
O "A83.GEO"
O "A765.GEO"
@ "A38456.geo"
@ "RX34.geo"
1 entries Of @ "A756473.geo" added In New data
我想只读取以@
开头的行我这样做是VB.NET
答案 0 :(得分:0)
Dim str as string = ""
Using sr as new io.streamReader(path)
While sr.Peek <> -1
Str = sr.Readline()
If str.startswith("@")
' Do action
End if
END While
End Using