Skip to content

Latest commit

 

History

History
306 lines (264 loc) · 15.3 KB

README.md

File metadata and controls

306 lines (264 loc) · 15.3 KB

🚀 C# Hello World Project

Lesson Snapshot

Build your first C# program that shows welcome messages on the screen. (Ages 8-18)

Folder & File Map

HelloCoderDojo/
├── .git/
├── HelloCoderDojo.csproj
└── Program.cs

Step-by-Step Build Guide

1. Fork and Clone the Repository ✅

  • What to do: Go to https://github.com/PhillyCoderDojo/HelloWorldCSharp → Click "Fork" button in top right → Then open GitHub Desktop → Click "Clone a repository from the Internet" → Select your fork → Choose a location on your computer → Click "Clone"
  • Where we're working: Making your own copy of our starter project, like getting your own LEGO set that matches the teacher's
  • Code snippet: None
  • Why it matters: This gives you your own version of the project to change without affecting the original, just like saving a game to your own memory card
  • Git command: git clone https://github.com/YOUR-USERNAME/HelloWorldCSharp.git
  • Documentation Link
  • 📸 SCREENSHOT: Rider

Rider

2. Open Repository Folder ✅

  • What to do: Find and open the folder you just created for your repository
  • Where we're working: Looking inside your new project home
  • Code snippet: None
  • Why it matters: We need to see where our code will live
  • Git command: cd HelloCoderDojo
  • 📸 SCREENSHOT: Rider Visual Studio – repo folder open

3. Launch JetBrains Rider ✅

  • What to do: Find Rider in your Start Menu/Applications folder and open it
  • Where we're working: Starting up our coding tool
  • Code snippet: None
  • Why it matters: We need our coding workshop to start building
  • Git command: None
  • 📸 SCREENSHOT: Rider Visual Studio – start page

4. Create New Project ✅

  • What to do: Click "New Solution" on the welcome screen
  • Where we're working: Setting up our coding project
  • Code snippet: None
  • Why it matters: This is like starting a new LEGO set with instructions
  • Git command: None
  • 📸 SCREENSHOT: Rider Visual Studio – New Project dialog Visual Studio – Project details Visual Studio – Location selection

5. Set Up Console App ✅

  • What to do: Select "Console Application" → Name it "HelloCoderDojo" → Choose your repository folder as location → Select .NET 8.0 → Click Create
  • Where we're working: Creating the blueprint for your program
  • Code snippet: None
  • Why it matters: Tells the computer what kind of program we're making
  • Git command: None
  • 📸 SCREENSHOT: Rider Visual Studio – Console template selected Visual Studio – Framework selection Visual Studio – Create project confirmation Visual Studio – Solution view

6. Create a .gitignore File ✅

  • What to do: In your project folder, create a new file named ".gitignore"
  • Where we're working: Making a special list that tells Git which files to ignore
  • Code snippet:
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# Visual Studio / Rider files
.vs/
.idea/
*.suo
*.user
*.userosscache
*.sln.docstates
*.userprefs

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# NuGet Packages
*.nupkg
*.snupkg
**/[Pp]ackages/*
!**/[Pp]ackages/build/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
  • Why it matters: Keeps your project clean by not tracking files that your computer creates automatically
  • Git command: None yet
  • 📸 SCREENSHOT: Rider Rider

7. First Commit ✅

  • What to do: Go back to GitHub Desktop → Review changes → Enter "Initial project setup" as commit message → Click "Commit to main"
  • Where we're working: Saving your project's starting point
  • Code snippet: None
  • Why it matters: Like taking a snapshot of your LEGO creation so far
  • Git command: git add . && git commit -m "Initial project setup"
  • 📸 SCREENSHOT: Rider

8. Explore Your Project ✅

  • What to do: In Rider, look at Solution Explorer (usually on the left side)
  • Where we're working: Looking at all the pieces of your project
  • Code snippet: None
  • Why it matters: Finding all the parts we need to build with
  • Git command: None
  • 📸 SCREENSHOT: Rider Visual Studio – Solution Explorer

9. Find Program.cs ✅

  • What to do: Double-click on Program.cs in Solution Explorer
  • Where we're working: Opening the main file where we'll write our code
  • Code snippet: None
  • Why it matters: This is your blank canvas for writing instructions
  • Git command: None
  • 📸 SCREENSHOT: Rider Visual Studio – Open Program.cs

10. Write Welcome Messages ✅

  • What to do: Delete any existing code and type these three lines
  • Where we're working: Writing in the Program.cs file
  • Code snippet:
Console.WriteLine("Hello, Philly CoderDojo!");
Console.WriteLine("Welcome to C# programming!");
Console.WriteLine("Today is Saturday, June 14, 2025");
  • Why it matters: Telling the computer what words to show on screen
  • Git command: None yet
  • 📸 SCREENSHOT: Rider Visual Studio – Editing Program.cs Visual Studio – Code entered

11. Run Your Program ▶️

  • What to do: Click the green ▶️ button at the top or press Ctrl+F5
  • Where we're working: Testing your program to see if it works
  • Code snippet: None
  • Why it matters: See your program come to life!
  • Git command: None
  • 📸 SCREENSHOT: Rider Visual Studio – Build succeeded Visual Studio – Run output Visual Studio – Output window Visual Studio – Debug console

12. Commit Your Changes ✅

  • What to do: Go to GitHub Desktop → Review changes → Enter "Add welcome messages" as commit message → Click "Commit to main"
  • Where we're working: Saving your progress in the magical notebook
  • Code snippet: None
  • Why it matters: Taking another snapshot of your work
  • Git command: git add Program.cs && git commit -m "Add welcome messages"
  • 📸 SCREENSHOT: Rider Rider Visual Studio – Commit view

13. Make It Personal ✅

  • What to do: Change the messages to include your information
  • Where we're working: Changing the words in Program.cs
  • Code snippet:
Console.WriteLine("Hello, my name is [YOUR NAME]");
Console.WriteLine("I am [AGE] years old");
Console.WriteLine("I want to learn programming because [REASON]");
  • Why it matters: Making the computer say things about YOU
  • Git command: None yet
  • 📸 SCREENSHOT: Rider Visual Studio – Personalizing code

14. Run Again ▶️

  • What to do: Click the green ▶️ button again to see your changes
  • Where we're working: Testing your personalized program
  • Code snippet: None
  • Why it matters: Making sure your changes worked correctly
  • Git command: None
  • 📸 SCREENSHOT: Rider Visual Studio – Re-run Visual Studio – Console output

15. Commit Personal Changes ✅

  • What to do: Go to GitHub Desktop → Review changes → Enter "Add personal information" as commit message → Click "Commit to main"
  • Where we're working: Saving your personalized version
  • Code snippet: None
  • Why it matters: Taking a snapshot of your customized program
  • Git command: git add Program.cs && git commit -m "Add personal information"
  • 📸 SCREENSHOT: Rider Visual Studio – Staging changes Visual Studio – Commit confirmation

16. Push to GitHub ✅

  • What to do: In GitHub Desktop, click "Push origin" to upload all your commits
  • Where we're working: Sending your project to the internet cloud
  • Code snippet: None
  • Why it matters: Backing up your code so it's safe forever
  • Git command: git push origin main
  • 📸 SCREENSHOT: Rider Visual Studio – Push to origin Visual Studio – Publish dialog Visual Studio – Publish complete

Run & Test ▶️

  • Click the green ▶️ button in Rider or press Ctrl+F5
  • You should see your messages appear in the console window
  • Common Error: If you see red underlines, check for missing semicolons (;) at the end of each line
  • 📸 SCREENSHOT: Rider Rider

Bonus Challenge 🔥

Make your program ask for the user's name and say hello to them!

Hint:

Console.Write("What is your name? ");
string name = Console.ReadLine();
Console.WriteLine($"Hello, {name}!");
  • 📸 SCREENSHOT: Rider

  • Git command: git add Program.cs && git commit -m "Add interactive name prompt"

IDE Screenshots

All images below are stored in fwdhelloworldctutorial/.

  • Rider/GitHub Desktop: the tutorial images in the steps above (hosted via GitHub attachments).
  • Visual Studio: the local captures below.

Visual Studio – Screenshot 2026-01-19 130619 Visual Studio – Screenshot 2026-01-19 130744 Visual Studio – Screenshot 2026-01-19 130805 Visual Studio – Screenshot 2026-01-19 131438 Visual Studio – Screenshot 2026-01-19 131534 Visual Studio – Screenshot 2026-01-19 131622 Visual Studio – Screenshot 2026-01-19 131712 Visual Studio – Screenshot 2026-01-19 131733 Visual Studio – Screenshot 2026-01-19 131923 Visual Studio – Screenshot 2026-01-19 142240 Visual Studio – Screenshot 2026-01-19 142254 Visual Studio – Screenshot 2026-01-19 142303 Visual Studio – Screenshot 2026-01-19 142449 Visual Studio – Screenshot 2026-01-19 142756 Visual Studio – Screenshot 2026-01-19 142828 Visual Studio – Screenshot 2026-01-19 143037 Visual Studio – Screenshot 2026-01-19 163637 Visual Studio – Screenshot 2026-01-19 163705 Visual Studio – Screenshot 2026-01-19 165107 Visual Studio – Screenshot 2026-01-19 165118 Visual Studio – Screenshot 2026-01-19 165256 Visual Studio – Screenshot 2026-01-19 165341 Visual Studio – Screenshot 2026-01-22 214351 Visual Studio – Screenshot 2026-01-22 214407 Visual Studio – Screenshot 2026-01-22 214801 Visual Studio – Screenshot 2026-01-22 215050 Visual Studio – Screenshot 2026-01-22 215059 Visual Studio – Screenshot 2026-01-22 215135