TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Derik
NA
6
0
Hello and some help for a newb
Feb 16 2007 5:07 AM
Howdy all, I'm fairly new to C# and am in need of some advice on a project I've started working on. I'm trying to create a functioning calculator (similar to the one that comes with windows) yet only used the add/subtract/multiply/divide and decimal functions. I have the form already designed including the 0-9 buttons, the equal button, a button to clear the label(s) as well as buttons for the functions mentioned above. So far I've declared class level variables for the 0-9 buttons, and each button's click event displays the correct number in a label. Now I'm at the part where I need to code for the add/subtract/multiply/divide/decimal/equal buttons. Should I be creating separate methods for each of these functions? Also, once you click a number button and then you click one of the add/subtract buttons etc., should the first number I entered be stored in an invisible label to be included in a calculation later? I just haven't got down the logic behind doing this yet. PS I am using MS VisualStudio.Net 2003 and I can email a zipped version of the project if anyone wants to take a look at it and add code for me to review. Thanks!
Reply
Answers (
4
)
Directory Help
how to create an array element that store multiple data types