public IControl AddControl(IControl control) { if (HasControl(control)) throw new InvalidOperationException("Cannot add a control more than once."); control.Enable(); _controls.Add(control); control.Show(); return control; }
public IControl AddControl(IControl control) { if (HasControl(control)) { throw new InvalidOperationException("Cannot add a control more than once."); } control.Enable(); _controls.Add(control); control.Show(); return(control); }