Hello, C#
A C# program starts in a method called Main. Console.WriteLine() prints text and then moves to a new line.
using System; lets you write Console instead of the full name System.Console. Curly braces group code into blocks.
Newer C# can skip the class and Main lines, but you'll meet this classic shape in most code you read.
Example (inside Main)
Console.WriteLine("Hi!");
Console.Write("2 + 3 = ");
Console.WriteLine(2 + 3);
Output
Hi! 2 + 3 = 5
Console.Write() prints without moving to a new line.Your tasks
0 of 3 done- Change the message to introduce yourself
- Print a second line with Console.WriteLine
- Use Console.Write once
Tutor
The tutor guides you toward the answer instead of handing it over. It uses your own Claude usage.
Quick check
What is the difference between Write and WriteLine?
No problems found. Unclosed tags, missing semicolons and errors show up here in plain words.
1using System;
2
3class Program
4{
5 static void Main()
6 {
7 Console.WriteLine("Hello, world!");
8 }
9}
The program starts in Main.
Variables
| No variables yet |
Output
Step 1 of 3