lundi 10 juillet 2017

Reduce if else series in windows form checkedlistbox c#

In c#, in my windows form, I use a checkedListBox. So far in my checkedListBox I have 3 items. And 3 series of if/elseif statement.

I would like to implement a neat way of having specific actions depending on the combination of the items chosen. I was thinking on a binary tree.

Is a binary tree okay, or is there a method/property I do not know about in the checkedListBox that can help me?

Aucun commentaire:

Enregistrer un commentaire