Re: Lot of classes
Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Thu, 15 Sep 2005 00:02:17 +0100
ernesto bascón pantoja <ebasconp@xxxxxxxxx> wrote:
> So, do you consider that implement this solution with subclass of Utility
> should be a better solution instead of using a lot of delegates?
I'd use each where it's appropriate. I wouldn't *force* deriving from
Utility though - why not use an interface, then you can derive from
Utility where it makes sense to do so, but implement the interface in a
different way where things are different?
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
Relevant Pages
- Re: Events In Interfaces Using Managed C++
... > I am attempting to define an interface in managed C++ that uses ... > events and delegates to inform other classes when errors occur and am ... MVP - VC ... Prev by Date: ... (microsoft.public.vc.language) - Re: Delegates VS interfaces - some confusion
... the reason that an interface with three methods is not relevant is ... implementor) having a direct access to all three methods? ... delegates) due to security reasons, ... giving us member level polymorphism?! ... (microsoft.public.dotnet.languages.csharp) - Re: Interfaces and Events
... you have the queue as the focus point. ... William Stacey [MVP] ... Instead of using delegates and events, ... (microsoft.public.dotnet.languages.csharp) - Re: Delegates VS interfaces - some confusion
... the reason that an interface with three methods is not relevant is that a three-method interface is different from the single-method characteristic of a delegate. ... That is, with a three-method interface, any code with a reference to an implementor of that interface has access to all three methods. ... wrapping delegates inside ‘CurrentDelegate’ property), ... private void MethodA() ... (microsoft.public.dotnet.languages.csharp) - RE: Delegates and Event to replace with Interface?
... Regards ... i can replace the interface with delegates and events as shown on my previous example. ... > int funcB(); ... (microsoft.public.dotnet.languages.csharp) |
|