Concept Explanation
This lesson introduces the basic shape of a C# program and helps the learner get comfortable with running code in a .NET environment. The goal is not to memorize theory, but to understand what a minimal program looks like, where execution begins, and how a simple statement produces visible output. By the end, the learner should feel confident opening a project, changing a line, and rerunning it to confirm the result.
Where to Put the Code
- Define color and position variables at the top.
- Create shape drawing or placement logic in the middle.
- Render output (print, canvas, SVG, or styled block) at the end.
Command Reference
- Run the program once, then change the learner name and confirm the output updates.
- Point to the line that actually performs the output and explain its role in plain words.
- Use this lesson to connect three basics: a using directive, a value stored in a variable, and a printed result.
- After editing the message, rerun the program and verify that the console shows exactly what you expected.
Step-by-step Guide
- Run the starter code and read the output before making any edits.
- Change the stored name or message text to something personal and run the program again.
- Explain in one sentence what Console.WriteLine is doing in this example.
- Make one small improvement for readability, such as a clearer variable name or a cleaner message.
- Finish with a quick check: does the program build, run, and print the updated text?
Practice Exercises
- Create a similar example that prints a course title and the current lesson number.
- Modify the program so it prints two lines instead of one.
- Write a fresh version that greets a different learner using a variable and string interpolation.
Coding Challenges
- Build a tiny welcome screen that prints a name, track, and short status message in a readable way.
- Compare hard-coded text with text built from variables, and explain which is easier to update later.
Mini Practice Tasks
- Rename one variable so its purpose is obvious at a glance.
- Add one extra output line and rerun the program.
- Write a one-line note describing what this first C# program demonstrates.
Common Mistake
Mixing x and y axes or using wrong coordinate origin causes shapes to appear in unexpected places.
Real-life Mini Challenge
Draw one square, one triangle, and one circle, then move X marker 2 steps right and 1 step down.