Click here to Skip to main content
15,890,741 members
Please Sign up or sign in to vote.
1.22/5 (3 votes)
See more:
How do I create a program in C# to find the sum, product, division, and difference of two numbers in a text box on a click of a button and clears the text box when a second button is selected

What I have tried:

Creating the form by inserting text box, labels and buttons.
Posted
Updated 3-Mar-21 21:36pm
v2

Probably by paying attention in class before the homework is assigned.

Try doing it on your own, and come back here with specific questions.
 
Share this answer
 
v2
If you allready have created your Form with the Controls on it a great work is done ...
Now you should look for the Events of the Buttons you want to work with.
To create such an Event-method your Development-System will help you - if you are in Designmode you only have to do a DoubleClick on the Control (Button) and such a method is created - you only have to du the Calculation and the assignment in it ...
 
Share this answer
 
Hi Justine,

Seems like you searching for a calculator in windows forms.
You can take a look at existing code libraries on places like GitHub.

This is a calculator which contains a couple of different math function you're searching for.
Calculator source code 1
Calculator source code 2
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900