Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C# I need comments, description of what the program does or how to use it. Also need documentation to show the program works in

In C#

I need comments, description of what the program does or how to use it. Also need documentation to show the program works in form of table.

Thanks, let me know if any question

namespace Calc { public partial class Form1 : Form { int number1; int number2; bool check1; bool check2; string text1; string text2;

public Form1() { InitializeComponent(); }

private void add_btn_Click(object sender, EventArgs e) { text1 = num1.Text; check1 = int.TryParse(text1, out number1); text2 = num2.Text; check2 = int.TryParse(text2, out number2);

if(check1 == false || check2 == false || (number1 < 0 || number2 < 0)) { result.Visible = true; result.ForeColor = Color.Red; result.Text = "Value must be numeric and > 0"; } else { int res = number1+ number2; result.Visible = true; result.ForeColor = Color.Purple; result.Text = res.ToString(); }

} private void multiply_btn_Click(object sender, EventArgs e) { text1 = num1.Text; check1 = int.TryParse(text1, out number1); text2 = num2.Text; check2 = int.TryParse(text2, out number2);

if(check1 == false || check2 == false || (number1 < 0 || number2 < 0)) { result.Visible = true; result.ForeColor = Color.Red; result.Text = "Value must be numeric and > 0"; } else { int res = number1 * number2; result.Visible = true; result.ForeColor = Color.Purple; result.Text = res.ToString(); } }

private void reset_btn_Click(object sender, EventArgs e) { result.Visible = false; num1.Text = ""; num2.Text = ""; } } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

What are the risks from subversive threats?

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago