这是 Visual Studio 2015 中的错误还是?
Exception Exception thrown: 'System.ArgumentNullException' in
mscorlib.dll ("Value cannot be null.") System.ArgumentNullException
我正在关注的代码/教程......
https://www.codeproject.com/Tips/397574/Use-Csharp-to-get-JSON-Data-from-the-Web-and-Map-i
要复制创建一个表单应用程序并添加一个名为“button1”的按钮,并为 button1_Click 函数添加此代码,URL 中的 http 不会出错,https 会出错...
var w = new WebClient();
string url = "https://www.msftncsi.com/ncsi.txt";
var content = w.DownloadString(url);
MessageBox.Show(content);