//this constructor is for when a type is passed public GenericStrongTypeComboBox(Type type) { AllowedType = type;//I decided to save this as a public variable in case it is needed later //MessageBox.Show("Type constructor ran");//for debug only ItemContainer_ = new ItemContainer(this, type);// create a new type bound ItemContainer }
private ItemContainer ItemContainer_; //this is the new hidden colleciton that will hold Items #endregion Fields #region Constructors //the default constructor for when nothing is passed in. //will not be type bound public GenericStrongTypeComboBox() { ItemContainer_ = new ItemContainer(this);//creates an instance for Items and owner is this combo }