N
not_a_commie
It seems I need one more type of member protection in my C# classes. I
run into this regularly. I've got a class X in assembly A. Class Y in
assembly B inherits from X and has a constructor that takes an
instance of X. The only way class Y can access data on the instance of
X coming into its constructor is if I make it public on X. Public is
too strong in this situation if data is only used in constructors of
derived classes. I want the ability to allow privileged access to
members of an instance from derived classes. (Protected allows this
privileged access only on the base instance.) Has anyone else run into
this shortcoming?
run into this regularly. I've got a class X in assembly A. Class Y in
assembly B inherits from X and has a constructor that takes an
instance of X. The only way class Y can access data on the instance of
X coming into its constructor is if I make it public on X. Public is
too strong in this situation if data is only used in constructors of
derived classes. I want the ability to allow privileged access to
members of an instance from derived classes. (Protected allows this
privileged access only on the base instance.) Has anyone else run into
this shortcoming?