+ 1

Inheritance of interface and abstract classes

Is it possible for a class to inherit from another class (normal and/or abstract) + multiple interfaces? For example Class Person : LivingBeing , IRace, IOtherInterface //Living being should be regular or abstract class

14th Mar 2019, 7:03 PM
Leon Rališ
Leon Rališ - avatar
3 Réponses
+ 1
What language are you learning ? My fast guess for c#. A class can inherit from 1 abstract class and multiple interfaces. Gone a try it now in the playground.
14th Mar 2019, 7:30 PM
sneeze
sneeze - avatar
+ 1
Thanks for the answer, yes it's C#
14th Mar 2019, 7:53 PM
Leon Rališ
Leon Rališ - avatar
+ 1
My fast guess was correct Max 1 abstract class or concrete class and as many interfaces as you like. https://code.sololearn.com/cwrcgtfRGxA0 Please put the language you use in the tags, it is a good habbit.
14th Mar 2019, 7:56 PM
sneeze
sneeze - avatar