-1
考慮以下代碼:我該如何解決這個錯誤?
Dim strUrl As String = "http://www.txtguru.in/imobile/api.php?username=username&password=password&source=senderid&dmobile=123456789012&message=message"
Dim request As WebRequest = HttpWebRequest.Create(strUrl)
Dim response As HttpWebResponse = DirectCast(request.EndGetResponse(), HttpWebResponse)
Dim s As Stream = DirectCast(response.GetResponseStream(), Stream)
Dim readStream As New StreamReader(s)
Dim dataString As String = readStream.ReadToEnd()
response.Close()
s.Close()
readStream.Close()
我對request.EndGetResponse()
得到一個錯誤和錯誤是:爲參數的「公共可重寫功能EndGetResponse(asyncResult作爲System.IAsyncResult 'asyncResult' 未指定
參數)作爲System.Net.WebResponse'。
我該如何解決?