Welcome to Wynthar's C# Tutorial Tutorial 1: Your First C# Application Introduction
After much thought, I have come to the conclusion that perhaps the way to start learning how to program in C# is to simply download the Visual C# Express edition, install it. Load up a simple program source, run it, and see what happens. Tweak a few things. See what changes and go from there.
Let's Begin
We will start as simple as displaying a message that just says "Hello World." That's the most common way people start learning to code. So, here's the link to Visual C# Express edition.
Download and Install this : Visual C# 2008 Express Edition (If you have problems with this step let me know in the comments or PM me. I'll write a separate tutorial just for installing Visual C# Express!)
Once it is installed, run it and this is what you will be presented with...
Next
Go to File->New Project... Select Windows Forms Application. Set the Name to Tutorial1 and click OK.
Next
This is your basic windows form. So, let's add a button. Click on View -> Toolbox This should open up the Toolbox on the right side.
Next
In the tool box, click on the [+] Common Controls to expand that menu. And click on Button.
Now go over to your form, and click in the middle of your form. It should create a button for you.
Next
Okay, now double click on the button you just created. It should be called button1. When you double click it, it will automatically go to the code screen and set up a bit of code that looks like this...
Next
The cursor should automatically be set on a blank line between a line with an open brace { and a line with a close brace }.
Let's enter the following on that blank line: MessageBox.Show("Hello world!");
Next
As you type, you may notice the program gives you suggestions for how to complete the current word. Don't worry too much about that for now.
Now, let's click on the green arrow to Run our application. (F5 should work as well)
Next
Your program should compile, and run. Then you will have a box with a button on it. Press the button.
Finally
Cheers, you have just created your first C# application! I would recommend you try changing the string and see the results. Experiment a bit on your own.
Once you are ready, you can move on to
Tutorial 2.
[Next Time]- I will expand on this tutorial and show you some more windows forms items
- We will go over some more code to begin learning to manipulate the flow of the program.
[Later]- If I get good feedback, I will continue these tutorials all the way up to making a simple map hack using some common offsets.
- Please feel free to post your feedback, comments, questions, and other things you might like to see.
- Thanks for reading guys!
[C# Tutorials]