ReSharper建议我们改变:
System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate(object sender,X509Certificate certificate,X509Chain chain,SslPolicyErrors sslPolicyErrors) { return true; };
成:
System.Net.ServicePointManager.ServerCertificateValidationCallback += (sender,certificate,chain,sslPolicyErrors) => true;
它看起来更清洁.但我们的目标是.NET 2.0.这仍然是我们应该做的事情吗?