|
ms
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
InterfacesHi All,
Is it compalsory to impliment all the methods defined in the interface by the derived class. On Apr 6, 4:33 pm, "a.mus***@gmail.com" <a.mus***@gmail.com> wrote: If you want to instantiate object of the class, yes.> Hi All, > > Is it compalsory to impliment all the methods > defined in the interface by the derived class. if you don't, you can have an abstract class. Yes. Otherwise, you will get a compile error. The implementation can
be empty, and do nothing (unless you need a return value), but you have to have an implementation. -- Show quoteHide quote- Nicholas Paldino [.NET/C# MVP] - mvp@spam.guard.caspershouse.com <a.mus***@gmail.com> wrote in message news:1175848409.918323.275400@n59g2000hsh.googlegroups.com... > Hi All, > > Is it compalsory to impliment all the methods > defined in the interface by the derived class. > Hello a,
it depends on your project and used methodology for example if u master TDD, then using interfaces is rather usable, because very often you need to "mock" your method calls --- WBR, Michael Nemtsev [.NET/C# MVP]. My blog: http://spaces.live.com/laflour Team blog: http://devkids.blogspot.com/ "The greatest danger for most of us is not that our aim is too high and we miss it, but that it is too low and we reach it" (c) Michelangelo am> Hi All, am> am> Is it compalsory to impliment all the am> methods defined in the interface by the derived class. am> Hello Michael ,
MN> it depends on your project and used methodology MN> for example if u master TDD, then using interfaces is rather usable, MN> because MN> very often you need to "mock" your method calls sorry, missed the point :) |
|||||||||||||||||||||||