第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

學(xué)習(xí)編程問題,怎么覺得微軟官網(wǎng)上有錯(cuò)

學(xué)習(xí)編程問題,怎么覺得微軟官網(wǎng)上有錯(cuò)

慕勒3428872 2018-12-06 17:06:08
今天學(xué)習(xí)要用到這個(gè)類HttpWebRequest,在msdn上查找 ?在這個(gè)網(wǎng)頁上http://msdn.microsoft.com/zh-cn/library/system.net.httpwebrequest_members(v=vs.90).aspx 但是我就覺得很郁悶,我在我的vs里建立了HttpWebRequest類就是點(diǎn)不出GetResponse方法。 然后我又到這個(gè)網(wǎng)頁http://msdn.microsoft.com/zh-cn/library/system.net.httpwebrequest.getresponse(v=vs.90).aspx復(fù)制粘貼下面的代碼都有錯(cuò)編譯不過去。 HttpWebRequest request = (HttpWebRequest)WebRequest.Create (args[0]); // Set some reasonable limits on resources used by this request request.MaximumAutomaticRedirections = 4; request.MaximumResponseHeadersLength = 4; // Set credentials to use for this request. request.Credentials = CredentialCache.DefaultCredentials; HttpWebResponse response = (HttpWebResponse)request.GetResponse (); Console.WriteLine ("Content length is {0}", response.ContentLength); Console.WriteLine ("Content type is {0}", response.ContentType); // Get the stream associated with the response. Stream receiveStream = response.GetResponseStream (); // Pipes the stream to a higher level stream reader with the required encoding format. StreamReader readStream = new StreamReader (receiveStream, Encoding.UTF8); Console.WriteLine ("Response stream received."); Console.WriteLine (readStream.ReadToEnd ()); response.Close (); readStream.Close (); 這是怎么回事?求解?
查看完整描述

4 回答

?
九州編程

TA貢獻(xiàn)1785條經(jīng)驗(yàn) 獲得超4個(gè)贊

說了這么大堆你漏掉了最重要的一點(diǎn)就是開發(fā)環(huán)境,windows phone開發(fā)中不支持同步的操作,所有網(wǎng)絡(luò)操作必須是異步的。你只能用BeginGetResponse。繼續(xù)去看例子吧。

查看完整回答
反對 回復(fù) 2019-01-21
?
一只名叫tom的貓

TA貢獻(xiàn)1906條經(jīng)驗(yàn) 獲得超3個(gè)贊

我前面就試了,不是版本的問題。

查看完整回答
反對 回復(fù) 2019-01-21
  • 4 回答
  • 0 關(guān)注
  • 407 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號