If I have a combobox click event set in the designer.cs page and then at some point during the running of the program, based on some condition, I no longer want the combobox
The reason you cannot use
comboboxname.Click = null
or
comboboxname.Click += null
is that the event Click
actually contains a list of event handlers. There may be multiple subscribers to your event and to undo subscribing to an event you have to remove only your own event handler. As it has been pointed out here you use the -=
operator to do that.