Hi,
An Interface is intented to be used only as a contract, with no
implementation at all. If you can define a static member you must provide an
implementation for it, thus breaking the no-code feature. Even more you
could need a static constructor (as a method that is called only once ,
before any other static member) so you ends with a class , or a class-like
entity
If you want to provide a Factory , simply use a factory class.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"mortb" <mo***@nospam.nospam> wrote in message
news:uO*************@TK2MSFTNGP02.phx.gbl...
Why can't you place static methods in an interface?
For example, if I want an uniform manner to create instances of classes
that implement my interface I'd like to put a static factory mehtod in the
interface. However, this is not possible as the interface does not allow
static memebers.
Is there a good reason for this design?
/mortb