System.ni.dll 中发生 System.Reflection.TargetInvocationException 类型的异常,但未在用户代码中处理。
var client = new WebClient();
client.DownloadStringCompleted += (sender, e) =>
{
XDocument doc = XDocument.Load(e.Result);
};
client.DownloadStringAsync(new Uri("http://mylocation.com/myfile.php?userid=xyz"));