I am very new in C#. I have written a code to get two numbers in two text boxes and basically show their multiplication in a third text box.
The code is like:
private void button1_Click(object sender, EventArgs e)
{
double A = double.Parse(textBox2.Text);
double B = double.Parse(textBox3.Text); //gets the hourly wage
double C = A * B;
}
I have written them all in an executing button class. How can I get "A" and "B" in their own private texbox classes and relate them in "C" text box class? I need to do it in order to validate the textboxes to give the user an error if he leaves any textboxes empty.