K1 Getting started: programming with C#
Build console programs with classes, collections, LINQ, tests and Git.
Who it is for
For beginners who want to learn programming properly after their first program, including people coming from another job.
Prerequisites
The K0 taster course or the placement test. Reading English well helps, because the documentation is in English, but it is not a requirement.
Afterward, you can
- Work with the .NET SDK, VS Code and the command line
- Build programs from types, methods and clear control flow
- Process data in lists, dictionaries, files and JSON
- Design classes, records and interfaces, composition over inheritance
- Write expressive code with LINQ, pattern matching and nullable reference types
- Handle errors and find them in the debugger
- Work with Git, pull requests and reviews
- Test code with xUnit and develop test-first
- Write asynchronous code with async, await and HttpClient
Contents
- 1.1
10 h
Tools
.NET SDK, VS Code with C# Dev Kit, the command line, Codespaces, project structure
- 1.2
25 h
The language
types, variables, expressions, control flow, methods, scopes
- 1.3
20 h
Data
arrays, List, Dictionary, strings, date and time, files, JSON with System.Text.Json
- 1.4
25 h
Object orientation
classes, records, interfaces, composition over inheritance, encapsulation, SOLID in the small
- 1.5
15 h
Expressive code
lambdas, LINQ, pattern matching, nullable reference types
- 1.6
10 h
Errors
exceptions, the result pattern, debugging
- 1.7
10 h
Git
commit, branch, pull request, review, conflicts
- 1.8
15 h
Tests
xUnit, good test names, a TDD kata, why the exit code counts
- 1.9
10 h
Asynchronous code
async/await, HttpClient, canceling with CancellationToken
- 1.10
20 h
Final project
the Kladde as a console program
About 160 hours in all (indicative).
Lessons
You see the text and video of every lesson here on the site after buying the course; the titles and goals are already shown. A self-study course: you work through the lessons in order and check your exercises yourself against the solutions.
The lessons stand under their modules, in the order of the course. Click a module to open or close its lessons.
1.1 Tools
Indicative: 10 hours · 5 lessons
-
Lesson 1 · about 120 minutes
From a file-based app to a project
-
Lesson 2 · about 120 minutes
Solution and folders
-
Lesson 3 · about 60 minutes
The editor as a tool
-
Lesson 4 · about 120 minutes
Using the command line safely
-
Lesson 5 · about 120 minutes
The same environment everywhere
1.7 Git
Indicative: 10 hours · 5 lessons
-
Lesson 6 · about 120 minutes
Recording versions with Git
-
Lesson 7 · about 120 minutes
Branches and merge
-
Lesson 8 · about 120 minutes
GitHub: the repository online
-
Lesson 9 · about 120 minutes
Pull requests and reviews
-
Lesson 10 · about 60 minutes
Resolving conflicts
1.2 The language
Indicative: 25 hours · 6 lessons
-
Lesson 11 · about 240 minutes
Values and types
-
Lesson 12 · about 180 minutes
Expressions and conversions
-
Lesson 13 · about 240 minutes
Control flow in depth
-
Lesson 14 · about 300 minutes
Methods
-
Lesson 15 · about 180 minutes
Scope and lifetime
-
Lesson 16 · about 180 minutes
Readable code
1.8 Tests
Indicative: 15 hours · 5 lessons
-
Lesson 17 · about 120 minutes
Why tests
-
Lesson 18 · about 180 minutes
Good tests
-
Lesson 19 · about 180 minutes
Designing for testability
-
Lesson 20 · about 240 minutes
Test-driven development
-
Lesson 21 · about 60 minutes
Tests in everyday work
1.3 Data
Indicative: 20 hours · 6 lessons
-
Lesson 22 · about 120 minutes
Lists and arrays in depth
-
Lesson 23 · about 180 minutes
Dictionary and HashSet
-
Lesson 24 · about 240 minutes
Text and culture
-
Lesson 25 · about 240 minutes
Date and time
-
Lesson 26 · about 180 minutes
Files and paths
-
Lesson 27 · about 180 minutes
JSON
1.4 Object orientation
Indicative: 25 hours · 6 lessons
-
Lesson 28 · about 240 minutes
Classes and objects
-
Lesson 29 · about 240 minutes
Encapsulation and rules
-
Lesson 30 · about 180 minutes
Records and value objects
-
Lesson 31 · about 240 minutes
Interfaces
-
Lesson 32 · about 180 minutes
Composition over inheritance
-
Lesson 33 · about 300 minutes
SOLID in the small
1.5 Expressive code
Indicative: 15 hours · 5 lessons
-
Lesson 34 · about 180 minutes
Lambdas and delegates: behavior as a value
-
Lesson 35 · about 240 minutes
LINQ: asking a list questions
-
Lesson 36 · about 180 minutes
LINQ: grouping, and when a query really runs
-
Lesson 37 · about 120 minutes
Pattern matching: checking values by their shape
-
Lesson 38 · about 120 minutes
Safe with null
1.6 Errors
Indicative: 10 hours · 3 lessons
-
Lesson 39 · about 180 minutes
Exceptions: when something goes wrong
-
Lesson 40 · about 180 minutes
The result pattern: expected errors as a value
-
Lesson 41 · about 180 minutes
Debugging: finding bugs instead of guessing
1.9 Asynchronous code
Indicative: 10 hours · 4 lessons
-
Lesson 42 · about 180 minutes
async and await
-
Lesson 43 · about 180 minutes
HttpClient: data from the web
-
Lesson 44 · about 120 minutes
Canceling with CancellationToken
-
Lesson 45 · about 60 minutes
Testing asynchronous code
1.10 Final project
Indicative: 20 hours · 4 lessons
-
Lesson 46 · about 120 minutes
Planning: the missing features as issues
-
Lesson 47 · about 720 minutes
Building: the Kladde in version 1
-
Lesson 48 · about 180 minutes
Review and polish
-
Lesson 49 · about 180 minutes
Wrapping up: demo, code reading and practice questions
Final project: the Kladde
What the Kladde can do after this course
Contacts and appointments as a console program, stored in JSON, with tests and a Git history with reviews.
At the end you present the project in a demo, explain a part of your code and quiz yourself with practice questions and their answers – on your own or in front of someone you know.
Certifications
No certification is needed at this stage.
Keep learning with Microsoft Learn
Microsoft's learning paths and documentation that go with this course.
- Write your first code using C# (Get started with C#, Part 1)
- Create and run simple C# console applications (Get started with C#, Part 2)
- Add logic to C# console applications (Get started with C#, Part 3)
- Work with variable data in C# console applications (Get started with C#, Part 4)
- Create methods in C# console applications (Get started with C#, Part 5)
- Debug C# console applications (Get started with C#, Part 6)
- Build .NET applications with C#