c# - ReSharper show warning with SqlDataReader -


When I type something like this:

 using  (var connection = Using new SqlConnection ("(reader (read ()) {}}}}}   

Reverse shows that shows the warning on reader.Read () , and states that the reader can be null .

< P> But in what cases can it be empty? As I know that the command returns no reader is empty It is not just anything.

Given that it reports as a bug on YouTrack (Twice - more), it seems that empty annotation sent with RT is less in this regard.

Your ReSharper_installation_dir \ Bin \ ExternalNnnations folder - this is The place where the annotation files are installed for me, with v5, here is a file in System.Data \ System.Data.Nullness.xml , which contains this annotation:

< Pre> & lt; Member Name = "M: System.Data.SqlClient.SqlCommand.ExecuteReader" & gt; & Lt; Specialty ctor = "M: JetBin.Anotation.CanbanNL. Attribute. #Ctor" /> & Lt; / Member & gt;

If you are satisfied with your own observation that this is wrong, and that SqlCommand.ExecuteReader never taps you, you should change it

> & lt; Member Name = "M: System Data. SQLLient.SqlCommand.ExecuteReader" & gt; & Lt; Specialty ctor = "M: JetBin.Notation.NoLine: Feature. #Ctor" /> & Lt; / Member & gt;

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -