Hints of Visual Studio Does Not Show the “Dispose” method of SqlDataReader
Clash 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
But I find Dispose
method in this Microsoft documentation.
Dispose
SqlDataReader Class
Please help. Many thanks.
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.
The reference source for
DbDataReader
(whichSqlDataReader
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