Hints of Visual Studio Does Not Show the “Dispose” method of SqlDataReader

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Hints of Visual Studio Does Not Show the “Dispose” method of SqlDataReader



Hints of Visual Studio do not show the Dispose method of SqlDataReader.


Dispose


SqlDataReader



This screenshot is captured from my Visual Studio. You can see Dispose method is missing.


Dispose



Please click this link to open image



But I find Dispose method in this Microsoft documentation.


Dispose



SqlDataReader Class



Please help. Many thanks.





The reference source for DbDataReader (which SqlDataReader inherits from) shows the Dispose method implemented publicly. The method is decorated with [EditorBrowsableAttribute(EditorBrowsableState.Never)] to hide it from IntelliSense.
– Bradley Smith
Aug 10 at 4:16



DbDataReader


SqlDataReader


[EditorBrowsableAttribute(EditorBrowsableState.Never)]




1 Answer
1



Dispose has [EditorBrowsable(EditorBrowsableState.Never)] defined on the method.


Dispose


[EditorBrowsable(EditorBrowsableState.Never)]



Thus, Visual Studio "hides" it from you (even though it will compile just fine).






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard