我正在使用我的 vb.net 应用程序从网站获取 3 行文本,并且我只想在按下按钮时在我的标签中显示第二行。我目前拥有的代码向我展示了所有 3 行。我怎样才能只显示第二行。
Dim webAddress As String = "Website"
Dim reader As StreamReader
Dim request As WebRequest
Dim response As WebResponse
Dim data As String = ""
Try
request = WebRequest.Create(webAddress)
request.Timeout = 30000
response = request.GetResponse()
reader = New StreamReader(response.GetResponseStream())
data = reader.ReadToEnd
Catch ex As Exception
MsgBox(ex.Message)
End Try