You never assign CalcOperator
, so it always remains the default for an Integer, which is 0
- which is add
in your enum
.
You can either add an event to change it whenever your ComboBox
changes, or you can do it on btnCalculate_Click
. If you don't need it anywhere else, you might as well do it on the Click
event:
CalcOperator = CType(cboOperator.SelectedItem, OperatorEnum)