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

Multi tool use
Multi tool use

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.

B8UX5C WodPfRhH2u1 Q0jHX TOtwNO gpzvc
D4YmY9MzT41eLsOyjpfE8

Popular posts from this blog

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

Dynamically update html content plain JS

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3