I am trying to create a generic factory-pattern-like mechanism.
The factory will be like:
public class APlugin<ActionType> where ActionType : IAction
// create a new action. Note: ActionType should contain
// an empty constructor
public ActionType CreateAction()
You can't force an empty constructor or any type of constructor on derived types.
Constructors do not get inherited, but do get called.
If not chaining to the base constructor (using the
: base() syntax), the default base constructor will be called implicitly.
From Using Constructors on MSDN:
In a derived class, if a base-class constructor is not called explicitly using the base keyword, then the default constructor, if there is one, is called implicitly.