-
Class implementing interface can access "inherited" Given the following:
The full error is CS1540: Cannot access protected member This is blatantly inconsistent. I know that a class technically does not "inherit" an interface, but then why is it allowed to access |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You've never been able to cast var values2 = base(IFactAdapter).CreateValues2(); |
Beta Was this translation helpful? Give feedback.
I think the problem is that the runtime requires changes in order to support such an invocation, regardless of what syntax would be used. As soon as
this
is cast to anything you lose the ability to call members that require privileged accessibility. This is true with inheritance, too.