QuickExercise C#
Step by step tutorial


Working with computers, there is with a lot of time without any physical activity. To balance this out, a full time programmer might want to plan some exercises in between the coding sessions.

Lets make a program that gives users a random exercise, like pushups. 
The main purpose of this is not to do pushups however, but to build a little app in c#. :)

Ask a mentor for a demo of the finished app before you start, so you know what you are building.

...

You tried it the finished app?  Good!

A good way to write code is to write small increments at a time, and test the code with every update. Make small changes in the code and test every stage of the code so you as often as possible have a working software. We will call this small changes, "sprints".

So lets get started. 

Sprint one. 

The sprint goal is to be able to write a name, and display this name.

First we want to start Mono.
Click on the Mono icon in the left app bar.

Now, create a new solution. Press CTRL+SHIFT+N. Next, choose a template. It should be "Console Project". Klick next. And then, you want to find the Location. Press Browse.. and click in the Documents folder. (or wherever you want)

Last, write a Project Name. Just write anything you want to. I am calling it QuickExercise. Then press Create. Finished? Try running it by pressing F5.

It says Hello World right? Good, lets go on now. Press enter to close the console.

Now lets start making some code. We want to ask the user what name it want to register.
Change line 9 of the code to:

Console.Write ("Enter your name: ");

Try it with F5 again. Looks ok? Good.

Now. We want to let the user enter a name. And we want to store the name.
Lets first make a "box" (or variable) to store the name. Like this:

string userNameInput;

This is telling the computer to prepare a box in a certain "size". So that a string fits inside it. When we write "string" we are telling the computer that we want to store a little bit of text. We could also write "int", which means we want to store numbers instead.

The "string-box" is to be created now with a name, this name is very important. The name is case sensitive, meaning we cannot call the userNameInput like this: USERnameINPUT. We have to write it exactly like it was created. This time userNameInput;

This name could be anything. It could be named banana, it does not matter.

string banana;