Write your first C# code.
This code will display an output on screen:
Console.WriteLine("Hello World");
Console.Write("Hello");
Console.Write("");
Console.Write("World!";
When a phrase is surrounded by double-quotations, it is called a literal string.
How it works.
The WriteLine() part is called a method. Methods always have a parenthesis after them.
The Console part is called a class. Methods live inside of a class.
There is also a dot . which separates the class name Console and the method WriteLine. The dot is a member access operator. This is how you navigate from a class to a method.
There is a semi-colon ; which is the end of statement operator. A statement is a complete instruction in C#. The semi-colon tells the compiler that the command is complete.
Comment code:
// This is a comment.
When a phrase is surrounded by double-quotations, it is called a literal string.