MustOverride Shared Methods in .Net
- by Ben
Hi
I have a few class's that inherit from a base class. I want to enforce that all of these Class's implement a shared method foo().
I am not able to create the following on the base class
Public MustOvveride Shared Sub foo()
as this is not allowed. I also cant create an Interface that defines a Shared Sub Foo() and implement that in my derrived class's, as this also is not allowed.
Does anyone know how i should implement this?
p.s i realise my example is in VB and i have also tagged C#, the same problem applies to both languages and presumably the same fix would apply.