I load custom controls into my form using reflection. I would like all my user controls to have a Start and End method, so that they all are:
public interface IStartEnd
{
void Start();
void End();
}
public class AnotherControl : UserControl, IStartEnd
{
public void Start()
{ }
public void End()
{ }
}
I would like the interface to load via reflection, but the following obviously does not work as an interface, cannot inherit a class:
public interface IMyUserControls : UserControl, IInit, IDispose
{
}
source
share