Re: How To Force Static Method Implementation

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tor Bådshaug (TorBdshaug_at_discussions.microsoft.com)
Date: 02/15/05


Date: Tue, 15 Feb 2005 01:27:02 -0800


> ..... If each derived class defines an implementation of the base
> class static method then there would be one or more implementations of the
> single method in the base class. There would be no way for the runtime to
> decide which single implementation to call at runtime.

There is no polymorhism with "overridden" static methods. Consequently, the
single impl to call is not resolved at runtime but compile time rather.

Tor Bådshaug
tor.badshaug (at) bekk.no.



Relevant Pages

  • Re: Problem with Exercise 4, Interfaces, Thinking in Java
    ... Create a static method that takes a reference to the base ... class, downcast it to the derived class, and calls the method. ... I also interpret "takes a reference" to mean that the method should take as a parameter that reference. ...
    (comp.lang.java.programmer)
  • Re: How To Force Static Method Implementation
    ... Zero or more classes can derive ... If each derived class defines an implementation of the base ... static method then there would be one or more implementations of the ... method in the base class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How To Force Static Method Implementation
    ... Jeff Louie wrote in news:uC3R$6wEFHA.3416 ... If each derived class defines an implementation of the base ... > static method then there would be one or more implementations of the ... > method in the base class. ...
    (microsoft.public.dotnet.languages.csharp)