C# Tutorial for Beginners - Part 1 - Introduction

C# (pronounced C sharp) can be used for any kind of software development such as web development, develop apps for PC or MAC, game development, or mobile app development, C# can pretty much does all by now. So, C# is super cool language that we will focus on learning and understanding it, because we need to use Unity 3D later that will use C# (i prefer) to code.

This tutorial will cover basics introduction on:
1. What C# can do?
2. What is an IDE?
3. Install IDE on MAC/PC
4. Create a project

What C# can do?

So, what c# can do? The answers is, a lot. As mention above, C# can pretty much be used to create game development, web apps, mobile apps, backend and service application.

C Sharp Applications Ecosystem As you can see above, C# can be used to create any applications. Not only windows or web applications but C# also can be used to create mobile apps, windows store application, android apps, web service that using data collection services.

What is an IDE?

IDE is Integrated Development Environment and basically just a software that you use to programming. So, if you are a video editor you might use premiere pro or sony vegas, if you are a programmer then you might use Mono Develop, or extended version of monodevelop, Xamarin Studio, or XCode, or you can use Visual Studio 2015.

Install IDE

Lets head over to our browser and then open up https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx and hit Download Community Free. Proceed to install after finish downloading and follow the steps.
Download Visual Studio 2015 Visual Studio Community edition is a free, full-featured and extensible IDE for Windows users to create Android and iOS apps with Xamarin, as well as Windows apps, web apps, and cloud services.
We will use Visual Studio 2015 for the rest of our tutorial.

Create a project

Open up Visual Studio 2015 and open new project, File > New... > Project (Ctrl + Shift +N).
We are going to create a simple command-line application.
Create new Visual Studio Project. You will see our C# starter template to start our first command-line app like this:

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Threading.Tasks;

namespace MainApp  
{
    class Program
    {
        static void Main(string[] args) // <=it's called method. It is called when the program start.
        {
        }
    }
}

If you run it, you will see nothing. Let's add some line of code.
Add this line inside the brackets of your Main method:

Console.WriteLine("Hello, it's my first command-line application!!!"); // <=it's called method. It is called when the program start.  
Console.ReadKey(); //it use to read any keypressed by user.  

so your complete code should become like this:

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Threading.Tasks;

namespace MainApp  
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, it's my first command-line application!!!"); // <=it's called method. It is called when the program start.
            Console.ReadKey(); //it use to read any keypressed by user
        }
    }
}

Try to run again. You will see like figure below.
Press any key and you will exit from the command-line app.

Well done!!! You have been created your first console app. Explore more while we create the next tutorial.

wahyu way

Tech savvy, mobile app consultant, hard worker, runner, traveller