1

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

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

Please click this link to open image

But I find Dispose method in this Microsoft documentation.

SqlDataReader Class

Please help. Many thanks.

habib
  • 2,366
  • 5
  • 25
  • 41
Psn TW
  • 39
  • 5
  • 1
    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 '18 at 04:16

1 Answers1

2

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

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

mjwills
  • 23,389
  • 6
  • 40
  • 63