Jump to content

Make a calculator with C#


Guest Mana.K.

Recommended Posts

Guest Mana.K.
I really need help for my project!!!
I have to submit my completed project in 2 weeks time..
I'm stuck with it.. :blush:
I have to use C# to create the calculator as in the one on Windows Start Menu..
Can someone help me out? And explain why you use a particular code?
Link to comment
Share on other sites

Guest nevets1219

Not being that familiar with C# but I know C++ and VB.NET and those 2 combined are similar to C#. I suppose you would have to design an interface (buttons and text boxes). Define actions for each buttons as well as some validations to insure accurate input. Regular expressions work great in VB.NET but I'm not sure how they work in C#. Create a global variable to store the last action pressed (add / minus / divide / multiply / etc).

If user clicked a button --> Check to make sure text box is not empty and is valid. Store that action and the number (I believe there are easy string to number conversion function available).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..