Caffeinated Coder
Book an appointment
Lesson 02 · Basics

Your first C# program

Make a console project with dotnet new console -o Hello, then grow Program.cs into five lines: a comment and four statements. Watch dotnet run build the code into Hello.dll and run it line by line: WriteLine prints a line and moves the cursor down, Write stays on the line, ReadLine waits for your typing and keeps it in a variable, and an interpolated string puts that value into a greeting.

12 min11 steps5 questionsBeginner
Fig 2 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.