public override bool Add(AbstractCommandable item) { if (item.GetType().IsAssignableFrom(typeof(AbstractMenuItem))) { throw new ArgumentException("Expected a AbstractMenuItem as the argument. Only Menu's can be added within a Menu."); } return(base.Add(item)); }
public override bool Add(AbstractCommandable item) { if (item.GetType().IsAssignableFrom(typeof (AbstractMenuItem))) { throw new ArgumentException( "Expected a AbstractMenuItem as the argument. Only Menu's can be added within a Menu."); } return base.Add(item); }