C# Nested Classes and Inheritance -
just need nested classes , inheritance..
namespace blah { private abstract class inheritedsomething { public void dosomething() {}; } class otherclass : inheritedsomething { //stuff class nestedclass : inheritedsomething { //stuff } } }
is correct way of doing things? seems bit redundant nestedclass
inherits inerhitedsomething
when parent class inherits this... when remove inheritance nestedclass
asks me make dosomething()
static method.
so question is, way "correct" - both otherclass
, nestedclass
inheriting inheritedsomething
or otherclass
inherits inheritedsomething
, dosomething()
becomes public static void
?
thanks!
correct or not depends on intend do.
inner types have privileged access enclosing type members not derive it.
what intention these classes?
Comments
Post a Comment