ok I read lots of answers to this kind of question, mostly vs an abstract class…
but one stupid question stays in my head.
why would i use an interface!? and i don’t mean because it makes multiple inheritance possible or most other answers.
for example:
base class Mammal;
derived classes a bunch of mammals (cats, dogs, lions, hippo’s,…)
let’s say we make IPettable for cats and dogs and other domestic mammals and it has methodes like void LearnTrick()…
since adding an interfaces to my cat or dog class means i have to add all it’s methodes, events, properties,…
why not just add these as unique methodes for the class in question?
so Cat would have it’s unique method LearnTrick() as well as dog with totally different implementation… I don’t see the need to put this in an interface… more so i don’t see the point of interfaces existing :-s
which i guess is wrong since smart people invent these things ![]()