Skip to content

Instantly share code, notes, and snippets.

@programatt
Created January 5, 2012 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programatt/1566149 to your computer and use it in GitHub Desktop.
Save programatt/1566149 to your computer and use it in GitHub Desktop.
Why does resharper think this is wrong?
catch (WebException e)
{
if(e.Response != null)
{
//resharper claims next line "Possible null assignment to entity
//marked with NotNull attribute.
//makes no sense to me because i'm checking null first
var r = new StreamReader(e.Response.GetResponseStream());
var data = r.ReadToEnd();
r.Close();
Logger.LogWarningMessage(string.Format("Trade failed to be updated \n Reason: {0}", data));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment