Hi
i am new to c sharp. i am building a simple calculator with a text box and few buttons. i need to store values entered into the text box from string to char array so that i can check for the '+' and perform addition among the elements like 12+22+11. i need to add all this functionality to the = button because i'll be using the + button to just add data into the textbox like 1, 2 buttons etc. This is what i have in the = button
I can't figure out what to do next. Can someone help me complete the code and also figure out the errors in the existing code if any. need help urgently.
i am new to c sharp. i am building a simple calculator with a text box and few buttons. i need to store values entered into the text box from string to char array so that i can check for the '+' and perform addition among the elements like 12+22+11. i need to add all this functionality to the = button because i'll be using the + button to just add data into the textbox like 1, 2 buttons etc. This is what i have in the = button
Code:
private void button3_Click(object sender, EventArgs e)
{
string s = textBox1.Text;
char[] c = s.TocharArray();
int i = 0;
for(;i<c.Length;i++)
{
if(c[i].Equals('+'))
Comment