我提供了一個HTTP Web服務,我的一個用戶正在Windows 2003計算機上使用C#WebClient類從我的網站檢索數據。我的用戶說WebClient正在創建許多瀏覽器實例,需要關閉。如何在創建後關閉瀏覽器?如何在創建C#WebClient類後關閉瀏覽器?
他的代碼:
Byte[] requestedHTML;
WebClient client = new WebClient();
requestedHTML = client.DownloadData("http://abcabc.com/abc");
UTF8Encoding objUTF8 = new UTF8Encoding();
string returnMessage = objUTF8.GetString(requestedHTML);
附:如果這聽起來像是業餘愛好者,我很抱歉,我對C#很陌生。
請不要道歉。我們都在這裏學習。 –