It's not possible and by some people's thinking (sorry, the thread is not on
the news server any more) it's "the exception that proves the rule" because
you can't instantiate an interface.
I think that's crap, because the compiler already throws an exception when
you try to instantiate a bare interface; allowing constructors in interface
definitions would cause no harm, and fill a gaping hole in the few (i.e.
serialization) that actually require certain constructor signatures to work.
Unfortunately I don't think it's on the list of 2005 enhancements.
Bob
"SA" <in*********@freemail.nl> wrote in message
news:ec**************@tk2msftngp13.phx.gbl...
Hi all,
How could I go about defining ctors in an interface. (not to instantiate
the interface, of course, but to force the implementing class to provide a
specific ctor).
Sub New(ByVal x as MyType) doesn't work.
May be it's not possible, in which case it should be on the to-do list for
future versions...
--
Sven