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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

6. Is all Internet training the same? Explain.

Answered: 1 week ago