I've come across a problem; I need a number of classes to implement a sertain static method. But I canâ??t seem to enforce this through an interface.

Ideas to another solution

Regard

Re: Static method in Interface (C#) by Chris

Chris
Tue May 25 08:03:47 CDT 2004

Look at your design. Does the method have to be static? Could you implement
an abstract base class?

--

Chris Rolon

This posting is provided "AS IS" with no warranties, and confers no rights.

"Rasmus" <anonymous@discussions.microsoft.com> wrote in message
news:53C9FF0F-C894-478B-8CA5-1FC44EAC5B88@microsoft.com...
> I've come across a problem; I need a number of classes to implement a
sertain static method. But I can't seem to enforce this through an
interface.
>
> Ideas to another solution?
>
>
> Regards
>
>



Re: Static method in Interface (C#) by anonymous

anonymous
Thu May 27 01:31:03 CDT 2004

No can do.
I've looked it over and since multible inheritence is not an option i'll need another solution

Any ideas?

Re: Static method in Interface (C#) by Craig

Craig
Thu May 27 14:18:34 CDT 2004

One idea: create another interface, which provides the methods you want to
make static. The implementation of this method will call the static members
for the implementation of the first interface. This could be considered an
interface to the class that implements the first interface (as opposed to an
interface to an instance of the class).

Craig Bryant
Tektronix, Inc.

"Rasmus" <anonymous@discussions.microsoft.com> wrote in message
news:23C38A0A-0200-45BB-BF9E-54423653A04E@microsoft.com...
> No can do.
> I've looked it over and since multible inheritence is not an option i'll
need another solution.
>
> Any ideas?