The beginning of C# "hello world" and the explanation

Hallo guys i want to learning code C# for making a programs, but for first must to learn is making "hello world" program, directly into core learning.

Now you must have a compiler for C# like visual studio, yeah i using visual studio for making program, because it very friendly with all code like java and other code. for download visual studio you can directly https://www.visualstudio.com/. i not want be advertising that but its so recommended haha. or you can just test code online in https://repl.it/languages/csharp.



After all ready we can starteit.
1.open your visuall studio => create New Projet =>then choice ConsoleApplication=>give nick name=> then OK like picture in below.



2.in second step you show code in window but you can remove all or copy in notepad or write in the book haha. In first line you write "using System" why must write this? in actualy not write that is not problem, it make symple program in code. oke now i want to show you diferent of using or not using.

program "hello world" (using System).
you just write inline :

using System;
class program
{
    static void Main(string[]args)
   {
       Console.Write("Hello World");
   }
}

program "hello world" (without using System).
you just write inline:

class program
{
    static void Main(string[]args)
   {
       System.Console.Write("Hello World");
   }
}

you see what diferent of both program? you see in System.Console blablabla. oke now you can run that program and you see "Hello World" text.

then i want to explanation what is static void Main  function in program. static void Main is declaration for making method Main() in C# for execution a program write in C#.

Oke maybe first learning about C# until here. and you can read more article program in here but using language indonesin becasuse this first my article using english language. thank you for visting this article.

0 Response to "The beginning of C# "hello world" and the explanation"

Post a Comment

Relevan Untuk Anda

Powered by Blogger.