Is it possible to inherit from a base class, which inherits from another base class?
-
Yes that's possible of course.BrokenGlass– BrokenGlass2011-04-27 02:13:16 +00:00Commented Apr 27, 2011 at 2:13
-
1And of course you tried it before you posted?Hans Passant– Hans Passant2011-04-27 02:13:17 +00:00Commented Apr 27, 2011 at 2:13
-
yes i tried it, but i got an error " Error 8 Inconsistent accessibility: base class 'commercial' is less accessible than classJohn– John2011-04-27 02:15:29 +00:00Commented Apr 27, 2011 at 2:15
-
You typically see that message when the base class is private - it is therefore "less accessible"Leons– Leons2011-04-27 02:18:32 +00:00Commented Apr 27, 2011 at 2:18
-
and you made sure all classes are equally accessible (all public for example)? Do a search for ".net class access modifiers" and be amazed!John Alexiou– John Alexiou2011-04-27 02:18:41 +00:00Commented Apr 27, 2011 at 2:18
4 Answers
You already have the answer provided in the question you asked before: c-abstract-classes.
I am not going to rewrite that code but if it's not perfect and it's give you errors then you need to do some debugging. Often times, people write code here that isn't 100% error free.
You need to run that code that was given to you and ask a SPECIFIC question about a SPECIFIC error. Post what you have tried and what you are trying to do along with your code.
Comments
Yes, it is! Look here. You know, there's a lot of reading you should do. Possibilities are exciting!
If you show us the code you are trying, maybe you would get more help.