Lesson 4
50 XP

Console Output

Console.WriteLine() Explained

Console.WriteLine() is your window to communicate with the user! It displays text on the screen and automatically moves to a new line after printing.

🎮 csharp
1
2
3
4
5
6
7
8
9
10
11
using System; class Program{    static void Main()    {        Console.WriteLine("Hello, World!");        Console.WriteLine("Welcome to C# programming!");        Console.WriteLine("This is so much fun!");    }}

Output:

Hello, World!
Welcome to C# programming!
This is so much fun!

Note: Each WriteLine() prints text and then moves to the next line automatically!