Add() public method

Adds a new item to the combo-box.
public Add ( string text, object value ) : ComboBoxItemViewModel
text string The display text of the item.
value object The value for the item.
return ComboBoxItemViewModel
        private static void PopulateBooleanDropdown(ComboBoxViewModel viewModel, ViewTestParameter parameter)
        {
            var name = parameter.Info.Name;
            viewModel.Add(string.Format("{0}: True", name), true);
            viewModel.Add(string.Format("{0}: False", name), false);

            var defaultValue = parameter.Info.DefaultValue;
            SelectDefaultValue(
                            viewModel,
                            defaultValue is DBNull ? false : defaultValue);
        }
 private static void PopulateEnumDropdown(ComboBoxViewModel viewModel, ViewTestParameter parameter)
 {
     foreach (var value in parameter.Type.GetEnumValues())
     {
         viewModel.Add(value.ToString(), value);
     }
     SelectDefaultValue(viewModel, parameter.Info.DefaultValue);
 }