static methods in an interface
Peter Osucha <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <[email protected]> |
I have an interface defined with some methods. I have two classes that implement this interface - however, I want the classes to implement the methods statically. I tried setting the method definition to 'static' in the interface but apparently, that's not allowed (I get an error 'The modifier 'static' is not allowed for this item'). If I just try to use the 'static' modifier in the class that implements the interface, I get another error telling me that the class does not implement the interface method (which doesn't have the 'static' modifier). What is going on here and why am I not allowed to create a 'static' method this way? How might I accomplish what I am trying to do, please? Sincerely, Peter =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com