Dim url As String = "http://foxupdate.mbldt.com/MH0ClientUpdate/update.txt"
\'1用旧方法读取udpate.txt
Dim req = System.Net.WebRequest.Create(url)
Dim pos = req.GetResponse
Dim stm As System.IO.Stream = pos.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim str As String = reader.ReadToEnd
pos.Close
stm.Close
reader.close
Output.Show("方法1读取:" & str)
Dim ary() As String = str.split("|")
Dim d As Date = ary(0)
Output.Show(d)
\'2用新方法读取udpate.txt
Dim hc As New HttpClient(url)
hc.SkipError = True
Dim str2 As String = hc.GetData
Output.Show("方法2读取:" & str2)
Dim ary2() As String = str2.split("|")
Dim d2 As Date = ary2(0) \'这里会出错,这个读取回来的字符串有毒
Output.Show(d2)