Here is an example:
http://benjnunez.pastebin.com/LQ440gPr Regards, Benj On Nov 16, 4:50 pm, Processor Devil <[email protected]> wrote: > Let's imagine you are making a game. > You want some objects to be breakable by hand, so you will have interface > IBreakable. > Let's say you also have iWood for objects from wood, iStorage for objects > that can be used to store items, etc. > > Now how to make a case, which can be destructible, you can store items in > and is from wood? > > class MyCase : IBreakable, iWood, iStorage > { > ... > > } > > 2010/11/13 It's time to do something <[email protected]> > > > Hi, can anyone here give me some ideas on how important interface is > > (in C#) and what it can do? > > I've learned that it can be used as polymorphism, but I don't > > understand why in some cases we don't use polymorphism instead ? And > > when do we use interface ? When do we use polymorphism instead ? > > Thank you so much ! I'm just a newbie at all. Hope someone will help > > me !
