Just need some help with nested classes and inheritance..
namespace blah
{
private abstract class InheritedSomething
{
public void doSomething() {};
}
class OtherClass : InheritedSomething
{
//Stuff
class NestedClass : InheritedSomething
{
//Stuff
}
}
}
Is this the correct way of doing things? It seems a bit redundant that NestedClass
inherits InerhitedSomething
when its parent class already inherits this... But when I remove the inheritance from NestedClass
it asks me to make doSomething()
a static method.
So my question is, which way is "correct" - Both OtherClass
and NestedClass
inheriting InheritedSomething
or only OtherClass
inherits InheritedSomething
and doSomething()
becomes public static void
?
Thanks!