The following must be done in C Create a Windows application
The following must be done in C#
Create a Windows application that contains two textboxes and three buttons. One of the textboxes and one of the buttons are initially invisible. The first textbox should be used to input a password. The textbox should be masked to some character of your choosing so that the characters entered by the user are not seen on the screen. When the user clicks the first button, the second textbox and button should be displayed with a prompt asking the user to reenter his or her password. Set the focus to the second password textbox. Now, when the user clicks the second button, have the application compare the values entered to make sure they are the same. Display an appropriate message indicating whether they are the same. Once the check is made, display a third button that resets the form.Solution
namespace Add_and_Multiply
 {
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }
private void button1_Click(object sender, EventArgs e)
 {
 int val1;
 int val2;
 val1 = Convert.ToInt32(textBox1.Text);
 val2 = Convert.ToInt32(textBox2.Text);
 label3.Text = Convert.ToString(val1 + val2); //after this line I tried putting the code to give me yellow color text and now I have so many errors:(
 }
private void button2_Click(object sender, EventArgs e)
 {
 int val1;
 int val2;
 val1 = Convert.ToInt32(textBox1.Text);
 val2 = Convert.ToInt32(textBox2.Text);
 label3.Text = Convert.ToString(val1 * val2);
 }
private void Form1_Load(object sender, EventArgs e)
 {
}
 }
 }
---
namespace Add_and_Multiply
 {
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }
private void button1_Click(object sender, EventArgs e)
 {
 int val1;
 int val2;
 if(!int.TryParse(textBox1.Text.Trim(), out val1))
 {
 lblYellow.ForeColor = Color.Yellow;
 lblYellow.Visible = true;
 lblYellow.Text = \"First value is invalid\";
 return;
 }
 if(!int.TryParse(textBox2.Text.Trim(), out val2))
 {
 lblYellow.ForeColor = Color.Yellow;
 lblYellow.Visible = true;
 lblYellow.Text = \"Second value is invalid\";
 return;
 }
 lblYellow.Visible = false;
 label3.Text = Convert.ToString(val1 + val2);
}
private void button2_Click(object sender, EventArgs e)
 {
 int val1;
 int val2;
 if(!int.TryParse(textBox1.Text.Trim(), out val1))
 {
 lblYellow.ForeColor = Color.Yellow;
 lblYellow.Visible = true;
 lblYellow.Text = \"First value is invalid\";
 return;
 }
 if(!int.TryParse(textBox2.Text.Trim(), out val2))
 {
 lblYellow.ForeColor = Color.Yellow;
 lblYellow.Visible = true;
 lblYellow.Text = \"Second value is invalid\";
 return;
 }
 lblYellow.Visible = false;
 label3.Text = Convert.ToString(val1 * val2);
 }
private void Form1_Load(object sender, EventArgs e)
 {
}
 }
 }


