1. Meet C# and the .NET platform
BeginnerUnderstand C#, .NET, the SDK, project files, and the first program.
C#, .NET, and the runtime
C# is a language; .NET provides runtime services and libraries.
The shape of a C# program
A small console application can use top-level statements.
Build, run, and read errors
The dotnet CLI supports the everyday development cycle.
Module checkpoint: Create a console project, print a greeting and a calculated value, then build and run it. Intentionally misspell an identifier and use the compiler message to locate the problem.
2. Variables, types, and expressions
BeginnerWork confidently with C# value types, reference types, inference, constants, and conversions.
Variables and type inference
Declarations give names to values, and var infers a local variable type.
Built-in types and literals
Built-in types represent numbers, text, characters, booleans, and more.
Constants and conversions
Constants and conversions make intent explicit.
Module checkpoint: Write a small unit-conversion program with descriptive variables. Try valid and invalid text input, and explain why each conversion succeeds or fails.
3. Operators and decisions
BeginnerBuild expressions and use branching to express program rules.
Arithmetic and comparison operators
Operators combine values into expressions.
Branch with if and else
if and else choose a path based on a Boolean condition.
Switch statements and expressions
Switch is useful when one value maps to several alternatives.
Module checkpoint: Create a simple grade calculator. Test values just below, at, and above each threshold, and make sure every possible score has a defined result.
4. Loops, arrays, and iteration
BeginnerRepeat work safely and work with indexed collections.
Count with for
A for loop keeps setup, condition, and update together.
Visit each item with foreach
foreach iterates through elements without manual index updates.
Arrays and bounds
An array stores a fixed number of elements of one element type.
Module checkpoint: Calculate the sum and average of an array. Test an empty array, a single-item array, and a larger array, and prevent division by zero.
5. Methods, parameters, and scope
BeginnerOrganize code into reusable methods with understandable inputs and outputs.
Declare and call methods
Methods give a reusable name to a unit of behavior.
Parameters and argument passing
C# passes arguments by value by default.
Overloads, optional parameters, and scope
Related method signatures can share a name.
Module checkpoint: Refactor a calculator into separate methods. Try normal values, negative values, and invalid operations, and document each method’s expected inputs.
6. Strings, collections, and data modeling
IntermediateRepresent and transform text and collections using common .NET types.
Strings and interpolation
Strings represent text and are immutable.
Lists, dictionaries, and sets
Choose a collection based on how data is accessed.
Enums, tuples, and records
Lightweight types can make data intent clearer.
Module checkpoint: Build a small inventory model using a list of items and a dictionary keyed by product code. Explain why each chosen collection fits its role.
7. Classes and object-oriented programming
IntermediateModel application concepts with classes, objects, properties, and constructors.
Classes and objects
A class defines a type; an object is an instance of that type.
Constructors and properties
Constructors establish an object’s initial state.
Static members and object lifetime
Static members belong to the type rather than one instance.
Module checkpoint: Design a BankAccount class with a constructor, a read-only balance property, and deposit/withdraw methods that reject invalid amounts.
8. Inheritance, interfaces, and polymorphism
IntermediateUse inheritance and interfaces to model substitutable behavior without excessive coupling.
Inheritance and protected members
Inheritance shares behavior through a base and derived type relationship.
Interfaces and implementation contracts
Interfaces describe capabilities that types agree to provide.
Overriding and polymorphism
Polymorphism lets code call behavior through a shared base or interface.
Module checkpoint: Create an interface for a notification sender and implement console and in-memory versions. Write caller code that can use either implementation.
9. Exceptions, nullability, and debugging
IntermediateHandle failures deliberately, express nullable intent, and investigate defects.
Exceptions and error handling
Exceptions represent failures that disrupt normal control flow.
Nullable references and null checks
Nullable annotations help communicate when a reference may be absent.
Debugging and boundary testing
Small, repeatable tests make defects easier to isolate.
Module checkpoint: Add validation and error handling to a text-input calculator. Test blank input, malformed numbers, zero division, and normal calculations.
10. Generics, LINQ, and data processing
IntermediateWrite reusable generic code and express data transformations with LINQ.
Generics and type safety
Generics let types and methods work with specified data types.
Filter and transform with LINQ
LINQ expresses common collection queries clearly.
Query design and execution
Readability and predictable execution matter in data pipelines.
Module checkpoint: Given a list of expenses, use LINQ to filter a category, order by amount, project a report-friendly shape, and calculate the total.
11. Files, streams, and JSON
IntermediateRead and write local data while handling resource lifetime and serialization.
Read and write files
File APIs allow programs to persist data between runs.
Streams and resource disposal
Streams support incremental processing of data.
JSON serialization
Serialization converts objects to a format that can be stored or transmitted.
Module checkpoint: Build a small settings store that loads and saves JSON. Test missing files, invalid JSON, and an expected successful round trip.
12. Delegates, events, lambdas, and async/await
AdvancedUse functions as values, event-driven patterns, and asynchronous operations.
Delegates and lambda expressions
A delegate represents a method signature that can be invoked through a variable.
Events and publishers/subscribers
Events let one object notify other objects that something happened.
Asynchronous programming with async and await
async/await makes asynchronous operations easier to compose.
Module checkpoint: Write an async method that fetches or simulates delayed data. Handle cancellation or failure and avoid blocking with Task.Result or Task.Wait.
13. Testing, project structure, and application design
AdvancedOrganize projects, automate checks, and prepare a maintainable application for delivery.
Projects, namespaces, and dependencies
A clear project structure makes code easier to navigate and maintain.
Unit tests and testable code
Unit tests verify behavior in small, repeatable scenarios.
Build, test, and publish
A reliable delivery workflow builds and tests before publishing.
Module checkpoint: Create a small tested Study Tracker with separate model and service logic. Include tests for empty data, invalid duration, and valid additions; then build and publish a Release configuration.