2

SqlDataReader class is not marked sealed then what makes it uninheritable?

2
  • 1
    Why do you want to inherit from it? Use extension methods instead! Commented May 7, 2011 at 14:57
  • i dont want to inherit it. just noticed that its not marked sealed but said to be uninheritable so just asked. Commented May 8, 2011 at 10:28

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Its only constructor is marked as internal, so it cannot be called by any non-framework code.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.