开发者

inheritance related problem in c#

i learnt that private members are available in sub class in c# 开发者_运维技巧but we cant use these then what is the use of those private members n sub class and how can i access those private member in sub class please let me now i am not getting this point.


i learnt that private members are available in sub class in c#

You learned wrong. Private members are not accessible to subclasses. They are visible only inside the current class (ignoring reflection of course). Only public and protected members are accessible in subclasses. Here's an article on MSDN which covers the different access modifiers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜