I have a BasePage class which all other pages derive from:
public class BasePage
This BasePage has a constructor which contains code which must always run:
public BasePage()
{
// Important code here
}
I want to force derived classes to call the base constructor, like so:
public MyPage
: base()
{
// Page specific code here
}
How can I enforce this (preferably at compile time)?