I m loading custom user controls into my form using reflection. I would like all my user controls to have a "Start" and "End" method so they should all be like:
public interface IStartEnd
{
void Start();
void End();
}
public class AnotherControl : UserControl, IStartEnd
{
public void Start()
{ }
public void End()
{ }
}
我想通过反思装满,但以下工作显然胜过,因为接口不能继承一个类别:
public interface IMyUserControls : UserControl, IInit, IDispose
{
}