Hi,
Calculator C# program simple one have a issue
The below code. I want a message like
Sum of a and B : (here the total)
Substraction of a and b: (Here the answer)
Just a message so the label is not seen as we open the calc
Experts please help.
regards
Raja
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
int a,b,c;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
a = int.Parse(textBox1.Text);
b = int.Parse(textBox2.Text);
c = a + b;
label.Text = c.ToString();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
a = int.Parse(textBox1.Text);
b = int.Parse(textBox2.Text);
c = a - b;
label3.Text = c.ToString();
}
}
}
Select all Open in new window
private void Form1_Load(object sender, EventArgs e)
{
button1_Click(sender, e)
}