Basic calculator in c # and a label

0

You will see, as the title says, I am doing a calculator. My concern is how to send a label the values that are being added in a sum of several numbers, example: 4 + 5 + 10 + 8 + 7 and so, that I accumulate the values that go putting in the label

    
asked by Axwell Duarte 17.02.2018 в 00:38
source

1 answer

1

You could do a function that receives the Parameter or text that you send example

public void textAdd(string texto)
{
   milabel.text =  milabel.text + " " +  texto;
}

and use it as follows:

textAdd("5");

Where 5 is the letter that you added, if your cell has nothing you will only see 5

    
answered by 17.02.2018 в 00:41