winzip icon

C# Basic Calculator

Submitted on: 8/22/2016 5:49:26 PM
By: Dave Bowlin 
Level: Beginner
User Rating: By 1 Users
Compatibility: C#
Views: 3477
author picture
     C# basic math calculator. My first try at C# programming. Pretty basic, but nice for beginners to learn from this code.

winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net

Other 75 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

3/23/2019 4:50:24 AMTrent Jackson

Have you since realized the OOP side of C# and use arrays for the buttons? It seems that the IDE WYSIWYG (What-You-See-Is-What-You-Get) -- GUI editor has no provision for control arrays of objects like buttons, check boxes etc... Wondering if I should code in notepad like when I did Java. Disappointing that I cannot simply use the mouse to whack a bunch of buttons on an form in an array like in VB6.
(If this comment was disrespectful, please report it.)

3/23/2019 8:46:57 AMTrent Jackson

This is an great STRAIGHT forward example though on how to make an calculator in C#. Perhaps throw in a couple of for loops and it will contain mandatory minimal memorizing of C syntax for program control / flow. You are using the switch statement. I love switch.
(If this comment was disrespectful, please report it.)

3/23/2019 12:03:06 PMDave Bowlin

Thank you! That was my very first attempt at C#, and I have since been using control and arrays for controls. In my latest sub (external DB), I use it to clear all the text boxes.
(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.