A comprehensive, beginner-friendly C# curriculum.
Learn modern C# and .NET development through hands-on exercises, real projects, and automated testing. This course provides structured learning with immediate feedback to build solid programming foundations.
C# Kickstart is a complete educational curriculum that takes students from zero programming experience to confident C# developers. The course emphasizes practical learning through:
- Progressive skill building with 9 comprehensive chapters
- Hands-on exercises with automated validation
- Real-world projects that demonstrate practical applications
- Professional development practices including testing and debugging
- Immediate feedback through comprehensive test suites
- Variables and Data Types: Understanding
int
,double
,string
,bool
- Operators: Arithmetic, comparison, and logical operations
- Control Flow: Conditional statements and decision making
- Loops and Iterations: Repetitive operations and data processing
- Functions and Methods: Code organization and reusability
- Data Structures: Arrays, lists, and collections
- Problem Solving: Structured approach with pseudocode and flowcharts
- Code Quality: Best practices, naming conventions, and documentation
- Testing: xUnit framework and test-driven development
- Debugging: VS Code debugging tools and techniques
- Version Control: Git basics and collaborative development
- Computer: Windows, macOS, or Linux
- Internet Connection: For downloading .NET SDK and VS Code
- Time Commitment: 2-3 hours per week for 8-10 weeks
- No Prior Programming Experience Required
- Visit dotnet.microsoft.com/download
- Download the latest LTS (Long Term Support) version
- Run the installer and follow the setup wizard
- Verify installation in terminal:
Expected output:
dotnet --version
8.0.xxx
or higher
- Download from code.visualstudio.com
- Install VS Code following the platform-specific instructions
- Install the C# Dev Kit extension:
- Open VS Code
- Press
Ctrl+Shift+X
(Windows/Linux) orCmd+Shift+X
(Mac) - Search for "C# Dev Kit"
- Click Install
- Click the green "Code" button on this repository
- Select "Download ZIP"
- Extract to your preferred location (e.g.,
Documents/Programming/
) - Open the extracted folder in VS Code
git clone https://github.com/r-/c-sharp-kickstart.git
cd c-sharp-kickstart
cd templates/console-app
dotnet run
Expected output: Hello, World!
cd ../xunit-project
dotnet test
Expected output: Passed! - Failed: 0, Passed: 3, Skipped: 0
The templates
folder provides ready-to-use project blueprints that save time and ensure consistency across all your work.
- Starting a new exercise: Copy the
console-app
template - Creating practice projects: Use
console-app
for experimentation - Writing tests: Copy the
xunit-project
template for test projects
# Copy the console app template
cp -r templates/console-app my-new-project
cd my-new-project
# Rename the project (optional)
mv ConsoleApp.csproj MyProject.csproj
# Start coding in Program.cs
code Program.cs
# Copy the xUnit template
cp -r templates/xunit-project my-tests
cd my-tests
# Rename the project (optional)
mv XUnitProject.csproj MyTests.csproj
# Start writing tests in UnitTest1.cs
code UnitTest1.cs
Template | Contains | Purpose |
---|---|---|
console-app |
Program.cs , ConsoleApp.csproj |
Standard C# console application |
xunit-project |
UnitTest1.cs , XUnitProject.csproj |
xUnit test project with examples |
Note: The templates include all necessary dependencies and are pre-configured for .NET 8.0, so you can start coding immediately without setup overhead.
Chapter | Topic | Key Concepts | Exercises | Status |
---|---|---|---|---|
01 | Introduction & Hello World | Setup, first program, compilation | 2 | Complete |
02 | Sequential Execution | Expressions, execution order | 2 | Complete |
03 | Variables & Data Types | int , double , string , bool |
2 | Complete |
04 | Operators | Arithmetic, comparison, logical | 2 | Complete |
05 | Input/Output | Console interaction, validation | 2 | Complete |
06 | Conditional Logic | if/else , switch statements |
2 | Complete |
07 | Loops & Iterations | for , while , foreach |
2 | Complete |
08 | Functions & Methods | Parameters, return values, scope | 2 | Complete |
09 | Collections | Arrays, Lists, algorithms | 3 | Complete |
10 | Code Quality | Standards, refactoring | 2 | Planned |
11 | Testing & Debugging | xUnit, VS Code debugger | 2 | Planned |
Project | Description | Skills Applied | Status |
---|---|---|---|
Number Guessing Game | Interactive console game with random numbers | Loops, validation, user input | Available |
Word Statistics | Text analysis and reporting tool | Strings, collections, file I/O | Available |
Calculator | Multi-operation calculator | Switch statements, decimal arithmetic | Planned |
Store Checkout | Point-of-sale system | Object-oriented design, data persistence | Planned |
- Study the Chapter: Read the theory and examples in
book/chapters/
- Practice with Exercises: Complete hands-on coding in
exercises/XX-topic/
- Validate Your Work: Run
dotnet test
to check your solutions - Debug and Iterate: Fix issues until all tests pass
- Apply Knowledge: Work on chapter projects
- Reflect and Review: Understand the concepts before moving forward
- Lesson Plans: Structured teaching materials in
docs/teacher/
- Assessment Tools: Rubrics aligned with PRRPRR01 standards
- Reference Solutions: Complete solutions for all exercises in
solutions/
- Common Issues: Troubleshooting guide for typical student problems
- Progress Tracking: Automated testing provides objective assessment
# Navigate to an exercise
cd exercises/03-variables
# Edit your solution
code Program.cs
# Test your work
dotnet test
# View detailed test results
dotnet test --verbosity normal
# Run your program
dotnet run
- Passed (Green): Your implementation meets all requirements
- Failed (Red): Code needs modification to meet specifications
- Skipped (Yellow): Test intentionally disabled (usually for advanced features)
Task | Command | Description |
---|---|---|
Create console app | dotnet new console |
Initialize new C# console application |
Create test project | dotnet new xunit |
Initialize new xUnit test project |
Build project | dotnet build |
Compile code and check for errors |
Run application | dotnet run |
Execute the compiled program |
Run tests | dotnet test |
Execute all unit tests |
Clean artifacts | dotnet clean |
Remove compiled files |
This course includes 134 automated tests across 9 test suites ensuring:
- Structural Integrity: All required files and folders exist
- Code Quality: Solutions compile without warnings
- Functional Correctness: Programs produce expected outputs
- Cross-Platform Compatibility: Works on Windows, macOS, and Linux
# Test specific chapter
cd tests/01-intro.Tests
dotnet test
# Test all chapters (Windows)
cd tests && for /d %i in (*) do (cd %i && dotnet test --verbosity quiet && cd ..)
# Test all chapters (macOS/Linux)
cd tests && for dir in */; do (cd "$dir" && dotnet test --verbosity quiet); done
This curriculum fully aligns with Swedish Programming 1 (PRRPRR01) requirements:
Standard | Implementation |
---|---|
Planning & Design | Pseudocode exercises, flowchart creation |
Implementation | Progressive C# programming exercises |
Testing & Validation | Comprehensive xUnit test suites |
Code Quality | Style guides, best practices, documentation |
Reflection & Ethics | Discussion questions, design choice analysis |
Upon completion, students will be able to:
- Design and implement console applications using C#
- Apply fundamental programming concepts (variables, control flow, functions)
- Write clean, well-documented code following industry standards
- Use testing frameworks to validate program correctness
- Debug programs using modern development tools
- Collaborate using version control systems
- Instructor Support: Contact your teacher for personalized assistance
- Peer Learning: Collaborate with classmates on concepts (not solutions)
- Documentation: Comprehensive guides in
docs/
directory - Issue Reporting: Use GitHub Issues for technical problems
Common issues and solutions are documented in:
We welcome contributions to improve this educational resource:
- Report Issues: Use GitHub Issues for bugs or content problems
- Suggest Improvements: Propose enhancements via Pull Requests
- Share Feedback: Help us improve the learning experience
- Translate Content: Assist with localization efforts
- 9 Chapters: Complete theoretical foundation
- 17 Exercises: Hands-on programming practice
- 17 Reference Solutions: Professional-quality implementations
- 2 Major Projects: Real-world application development
- 134 Automated Tests: Comprehensive validation coverage
- 95% Complete: Ready for classroom deployment
This project is licensed under the MIT License - see the LICENSE file for details.
- Swedish Education Agency: For PRRPRR01 curriculum standards
- Microsoft: For excellent C# and .NET documentation
- xUnit Community: For robust testing framework
- Open Source Community: For inspiration and best practices
- Educators and Students: For feedback and continuous improvement
Ready to begin your C# journey? Start with Chapter 01: Introduction & Hello World