Force Implementation of a Constructor

  • Thread starter Thread starter Steve - DND
  • Start date Start date
Alan Pretre said:
I'm with you now.

So we would be trading one constructor type for another; either way there is
a compiler-unenforced rule to provide a specific kind of constructor.

Exactly :(

A really *good* solution would also allow static methods to be
described, and then executed in a type-safe way given a type. For
instance:

Type t = pluginAssembly.GetType (pluginName);

MyPluginInterface(t).CallStaticMethod();
MyPluginInterface instance = MyPluginInterface(t).new (param1, param2);

That's just a random example syntax, but it would be nice to be able to
do something like that. I think. Maybe :)
 
Jay B. Harlow said:
Note although the above is blunt, it was not meant as a slam!

Mentioning readonly members would have been good enough. Bluntness was
unnecessary. Thanks I guess.

-- Alan
 
Back
Top