request.GetResponse().GetResponseStream()
我收到有关如何处理此问题的警告?
public void GetUserList(string url)
{
var request = (HttpWebRequest) WebRequest.Create(url);
string response;
using (var stream = new StreamReader(request.GetResponse().GetResponseStream()))
{
response = stream.ReadToEnd();
}
response = DelimiterStrings.Aggregate(response, (current, delim) => current.Replace(delim, "\n"));
foreach (var line in response.Split(DelimiterChars))
{
MainWindow.UserList.Add(line);
}
}
Resharper 不知道如何“修复它”