开发者

why cant SqlDataReader class be inherited?

开发者 https://www.devze.com 2023-03-04 18:38 出处:网络
SqlData开发者_StackOverflowReader class is not marked sealed then what makes it uninheritable?The SqlDataReader type\'s constructor is marked as internal which means it can only be instantiated throug

SqlData开发者_StackOverflowReader class is not marked sealed then what makes it uninheritable?


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消