我有一個問題,Web 客戶端無法識別 Web 的內容。
public Form1()
{
InitializeComponent();
WebClient webClient = new WebClient();
try
{
if (!webClient.DownloadString("https://pastebin.com/raw/SUVh3TP1").Contains("dasda"))
{
MessageBox.Show("Working!");
}
}
catch
{
}
}
uj5u.com熱心網友回復:
在webClient成功下載該URL和讀取的存在的字串(“dasda”)。因為你有!你的,如果條件的開始,當.Contains()計算結果為true,在表達if的計算結果為false與MessageBox.Show()被跳過。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/408702.html
標籤:
下一篇:List<T>不可為空?
