Csharp Tutorial Road to a Finished System [Hello World]


Good Day Everyone 😊, Welcome to our second C# programming tutorial

Today, I'm going to discuss about the obligatory "Hello World Program"

Hello World Program

This program can be called the obligatory program whenever a programmer learn a new language, this is the most basic and the fundamental program or syntax a programmer might think of. . .
This program is traditionally used to introduce novice programmer to a new programming language

Let's start the tutorial, open the Visual Studio 2013.


The first window that will appear is the Starting page of the Visual Studio 2013
On the left part of the Starting page we can see all the Recent Projects we have developed, the image above show all the projects I have developed using the platform
To start our very first program in C# programming language Click on the New Project above and a form will pop up
On the left part of the form will show all the available programming language on the platform, select the Visual C# then console application. The console application is a project used for creating a command line application.
The Name, Solution Name and the Location of the project will be need to specified.
After hitting the OK button the project will now be created and a form pop up including some generated references and the namespace.

REFERENCES This are the references that our program need to ensure that the program will run without any interconventions
NameSpace Is the "master container" of the program, this holds all the syntax and codes of our program
Once we start typing a box will pop up showing the Intellisense feature of the Visual Studio. This predicts the typing of the user and show suggest options. We can double click on the suggested word to automatically type our desired syntax or code, also we can simply clicked on the Enter Key as long as the desired word is high-lightened like the image above.
Just type the following code as shown above and press the f5 key
We can also clicked the encircled button as show above
Pressing the f5 key or clicking the start button will run our Hello World Program.
A console form will pop up showing our output "Hello World"
We have quickly finished our Hello World Program, so let's discuss our syntax more thorough

As I've said earlier, the namespace is our master collection. Now for none technical learners lets treat the namespace as a "PLANET"

So we have created a planet named Hello_World
Next will be the class, a namespace must contain only ONE specific type or class. Let's treat our class as specific person in the planet (As we all know, in a planet there is only one specific person as we all differ from each other) In our project our class was named Program
We can have different namespace or planet and we can named it whatever we want, it might contain a class named also Program and it will not affect the other as long as there is no similar class inside one namespace
The image above will show a function code block, a code block is grouped inside an open together with its closing curly bracket/braces. This identifies the scope of execution of the program
The function code block shown above is named function Main
The line *"static void Main(string[] args)" is the starting point of the function main

  • static means that the function is only one
  • void means that the function will return nothing
  • Main will be the name of the function
  • (string[] args) will be the argument of the said function
    Our Console will now be manipulated using WriteLine and Read Methods
  • Read keeps our window open, try to comment out the Console.Read() line with double slash(//) like the image below
    Try to run the program and the console form will just appear and disappear almost instantly
  • WriteLine writes the specified text value (written inside the parenthesis, also this method is only applicable to a single line text value)

There we go, our second tutorial about the C# programming language. Thank you for reading my tutorial for the day, hope you learn from me and you follow our VERY FIRST PROGRAM.


Here is our previous tutorial in the Series:
Csharp Tutorial Road to a Finished System [Introduction]
Special C# Tutorial with MongoDB:
Advance C# Programming with MongoDB


I am part of the @steemitfamilyph Join us
Be a member on our Facebook page -- Click this Link
26906086_10208718864569314_1705464943_o (1).png

Sort:  

This post received a free Upvote. Get your free Upvote NOW! Just follow @freeupvote

The @OriginalWorks bot has determined this post by @coderzairos to be original material and upvoted it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!

Please note that this is a BETA version. Feel free to leave a reply if you feel this is an error to help improve accuracy.

@coderzairos CONGRATULATIONS YOUR PUBLICATION HAS BEEN SHARED BY @Untapentuoreja, will be seen by 2325 steemians.
If you find my project useful, donate a vote to my comment

Coin Marketplace

STEEM 0.17
TRX 0.24
JST 0.034
BTC 95924.26
ETH 2810.51
SBD 0.67