Click here to Skip to main content
15,902,447 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
private void buttonEqual_Click(object sender, EventArgs e)
      {
          if (Div)
          {
              int skl = Convert.ToInt32(textBox1.Tag) + Convert.ToInt32(textBox1.Text);
              textBox1.Text = skl.ToString();
          }
Posted
Comments
shakil442 24-May-11 2:41am    
thanks for all help ...

You are converting to properties of the textbox, Tag and Text into intergers and then adding them.
The tag property of a textbox gets or sets data for a control[^].
The text property is the property that holds text for the textbox.
 
Share this answer
 
Seems like calculator code.
First value is displayed on textbox (text).
When you press operator, the value is moved to tag.
Then when you press second number, that is displayed on the text.
When you click equal, it does operation on value in tag and value in text.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900