public void AddButton(string text, string val) { if (text == null) throw new ArgumentNullException("text", "Text of a button cannot be null"); if (val == null) throw new ArgumentNullException("val", "Value of a button cannot be null"); var button = new FAMessageBoxButton(text, val); AddButton(button); }