You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The statement `a.x = 10` generates an error because it is made within the static method Main, and not an instance of class B.
29
+
The statement `a.x = 10` generates an error because it accesses the protected member through a base class reference (`a` is of type `A`). Protected members can only be accessed through the derived class type or types derived from it.
30
30
31
31
Struct members cannot be protected because the struct cannot be inherited.
0 commit comments