Re: How to tell if an interface method has been implemented

Tech-Archive recommends: Fix windows errors by optimizing your registry



Jon Skeet [C# MVP] wrote:

2. Should I just call MethodB as if it had been implemented?  Is there
any performance issues with calling an empty sub?

It's unlikely to be a bottleneck, certainly - I would only worry about it when you've definitely got a problem.


One thing you could do is add a custom attribute which you'd create (eg StubImplementationAttribute) to the stub implementation - then you could look for that.

.... but that would certainly take more time than just calling the empty method.




               Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619 http://www.sturmnet.org/blog
.



Relevant Pages

  • Re: Extending Methods Vs Delegates
    ... what is the purpose of calling a sub class method ... This makes it easier to simply provide custom initialization, ... This example however lets you customize behaviour that's ... The problem with the world is stupidity. ...
    (comp.lang.python)
  • What is: UI Runtime Error in PKWARE SecureZIP SaveSecure?
    ... Custom UI Runtime Error in PKWARE SecureZIP SaveSecure ... An error occured while calling the callback: ...
    (microsoft.public.word.docmanagement)
  • Re: Mobile Phone in Italy
    ... saying the number, ... and the custom to answer with a phone number or ... with one's name has never been popular in Italy. ... dialling randomly it has no right to know who he is calling. ...
    (rec.travel.europe)
  • Re: Adding parameters to base methods
    ... It sounds like you should be using a custom ... > method anyway and calling it from the Clickmethod. ... quite a bit of editing to pull it out to a form method. ... i x dot n e t c o m dot c o m ...
    (microsoft.public.fox.programmer.exchange)