我正在使用 vb.net,这就是我的 test.txt 文件中的内容:
My name is james
I was born in Melaka
*
I like to eat fish
#
My hobby is riding
我希望我的函数在符号 * 和 # 之间读取此文件
这是我的功能,我将如何编辑它以放入条件?
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim fileReader As String
fileReader = My.Computer.FileSystem.ReadAllText("C:\Users\user\Documents\text.txt")
txt2.Text = (fileReader)
End Sub
谢谢