SqlDataReader
class is not marked sealed then what makes it uninheritable?
Asked
Active
Viewed 944 times
2

Marc Gravell
- 1,026,079
- 266
- 2,566
- 2,900

vatspoo
- 391
- 3
- 8
- 14
-
1Why do you want to inherit from it? Use extension methods instead! – Steven May 07 '11 at 14:57
-
i dont want to inherit it. just noticed that its not marked sealed but said to be uninheritable so just asked. – vatspoo May 08 '11 at 10:28
2 Answers
4
The SqlDataReader
type's constructor is marked as internal
which means it can only be instantiated through types in the System.Data.dll
assembly. This also prohibits you from inheriting from it, as the base type cannot be instantiated.

Matthew Abbott
- 60,571
- 9
- 104
- 129
0
Its only constructor is marked as internal, so it cannot be called by any non-framework code.

Quick Joe Smith
- 8,074
- 3
- 29
- 33