c# - Trying to subtract setup from cost in a NumericUpDown -


i trying subtract setup cost. so, need value numericupdown box , store integer, can use subtract setup from.

public partial class form1 : form {     int setup = 100;     int finalcost;     int cost;     int priority;      public form1()     {         initializecomponent();     }      private void button2_click(object sender, eventargs e)     {         priority = trackbar1.value;         int cost = (int)numericupdown1.value;         if (radiobutton1.checked)         {              finalcost = cost - setup;             messagebox.show(finalcost.tostring());         }     } 

set numericupdown maximum property higher 100.


Popular posts from this blog