C# Programming Tutorials: Beginners 06 Creating a Calculator – Manipulating String Text | Video

Part of the series of tutorials on programming C# for beginners

Continues with the creation of a basic calculator, making all the buttons work and teaching you string manipulation techniques

Source code: https://github.com/angelsix/youtube

READ ALSO:  Why Africa Is Not All Safaris - Climbing Mt Kilimanjaro



  1. it deleted for me from the left to the right … please how to inverse that
    1- Man Thanks for the video
    2- You explain for us like we know what you are talking about , man we don't try to explain for as from scratch
    3- in certain moments we think you have no idea what are you doing , try -eliminate till it works , that's a bit confusing .
    Thank You after All

  2. I used this to focus and select from the end at the same time.
    #this.UserInputText.Select(this.UserInputText.Text.Length, 0); // Select from a start position N characters forward with N=0 and the start
    // position being my text length

  3. 1:41 When i try to use the string empty method i get this error" Severity Code Description Project File Line Suppression State

    Error CS0119 'Form1.TxtUserInput(object, EventArgs)' is a method, which is not valid in the given context Calculator C:UsersjxcwiDesktopProgrammingOOPCalculatorForm1.cs 28 Active


  4. These video's have been great help for me. Thank you!
    I wish YouTube suggested follow-up video's however, saves me from searching it manually. Perhaps you could include links in the video/description.

  5. The "C" and "CE" buttons have different functions. The "C" button acts as a Clear All function, essentially deleting all of your input.
    The "CE" button acts as a Clear Entry function, only clearing the last number you've inputted.
    Moot point but your implementation of CE is incorrect.
    Still a great tutorial though!

  6. I've been wondering. I, instead of having a method for each button, made one method for a click event with a switch inside of it. It has a case for C, backspace and operators with default being numbers. Is that ok? Or is it actually better for each button to have it's own method?

  7. If the delete button is the only button that runs the code to deal with the selection issue, why not just have it in the delete click event handler? Does it really need a separate function if nothing else is going to use it?

  8. Hello, thank you for your video, i learned a lot specially from the first part of this video. I'd like to follow everything you do in the video but when i encountered this -> https://photos.app.goo.gl/DWs51ij9ewryxKj58 i don't know what to do next. It looks very different from your result. I don't have any previous experience/background in programming, that's why i have no idea what to do. Please help me. i want to finish this Basic Calculator Project. Thank you Very Much.

  9. Could we just use a single event method to add text to text field?
    We could just take the text from the button which was clicked using:
    string s = (sender as Button).Text;
    and simply call the insertTextValue(s) method with the button text as parameter.
    We could avoid using so many methods.

  10. There are far too many comments, in my opinion. I enjoy your videos, but I don't see the point of commenting things that are self-evident. Based on everything I've read, the number of comments in your code seems like overkill.

  11. Instead of passing hardcoded value to InsertTextValue method you could have used the Text property of a button. Another improvement would be to use the same handler for all the buttons and retrieve the Text property from sender parameter. I really like your tutorials!

Comments are closed.