What C# and .NET Are
Understand how the C# language, .NET runtime, and libraries fit together.
RRTutors • Original C# and .NET course
48 detailed lessons, from your first .NET console app to APIs, async services, secure design, and deployment. Examples target modern C#; check each project’s .NET SDK for supported language features.
Every lesson includes an explanation, key points, a code example, expected behavior, and a practice exercise. The course emphasizes nullability, resource lifetimes, async flow, data boundaries, testing, and maintainable application design.
Baseline: modern C# and .NET 8 or later. Some snippets use top-level statements or newer syntax; check the project language version if your compiler reports a version-specific diagnostic.
Build the foundation: the .NET SDK, types, nullability, collections, methods, and objects.
Understand how the C# language, .NET runtime, and libraries fit together.
Create, build, and run a C# console project with the .NET command-line tools.
Use a top-level statement, standard output, and string interpolation.
Choose types from the data’s meaning and initialize variables before use.
Represent possible absence explicitly and respond to null before using a value.
Build readable strings with interpolation and distinguish text formatting from data serialization.
Prefer TryParse for expected invalid input and validate business rules separately.
Understand integer division, precedence, and checked conversions.
Choose control-flow constructs that make the valid states easy to see.
Use foreach for collection traversal and indexed loops when position matters.
Design methods with clear input, output, and mutation behavior.
Choose collections based on required operations and ownership.
Use classes when behavior and protected state belong together.
Establish valid object state during construction and expose controlled access through properties.
Use records for data whose identity is defined by its contents.
Apply C# to everyday application work: LINQ, HTTP, files, testing, and asynchronous code.
Depend on small capabilities and combine behavior rather than forcing deep inheritance.
Use inheritance for genuine substitutability and composition for assembled behavior.
Reuse algorithms across types while preserving compile-time type safety.
Use exceptions for exceptional failures and handle them at a boundary that can recover or report.
Use hash-based collections with stable equality and hashing behavior.
Filter and transform sequences declaratively while understanding when queries execute.
Pass behavior as a strongly typed value using delegates and lambda expressions.
Notify subscribers without exposing the publisher’s event invocation mechanism.
Use disposable APIs with using and choose text or byte streams to fit the format.
Use a serializer for JSON syntax and validate deserialized data as untrusted input.
Send HTTP requests asynchronously and manage client lifetime with the hosting model.
Await I/O-bound operations without blocking a thread while the operation is incomplete.
Propagate cancellation through async work and stop promptly at safe points.
Test behavior through public contracts and make external dependencies controllable.
Explore runtime behavior, concurrency, observability, security, and performance.
Constrain type parameters to the operations your reusable code truly needs.
Express type, property, and relational checks directly in control flow.
Represent success and failure as explicit alternatives instead of loosely related flags.
Know when LINQ is in-memory and when a provider translates expressions elsewhere.
Build an application by composing services with explicit lifetimes and dependencies.
Keep environment-specific configuration outside source code and validate it at startup.
Record structured context that helps diagnose behavior without leaking sensitive data.
Dispose owned resources deterministically and follow the ownership contract of each API.
Process asynchronous sequences incrementally with cancellation and bounded memory.
Use spans for bounded, allocation-conscious access to contiguous memory.
Coordinate concurrent access with synchronization or avoid shared mutable state.
Protect application boundaries by validating inputs and using secure framework APIs.
Measure the real workload before optimizing and preserve correctness while improving it.
Use attributes to attach metadata and reflection only when runtime discovery is necessary.
Call native code only with explicit ownership, calling convention, and data-layout contracts.
Design maintainable APIs and architecture, then prepare and verify a release.
Expose contracts that communicate ownership, nullability, errors, and compatibility.
Separate domain rules from infrastructure so important behavior can be tested independently.
Create repeatable release artifacts and verify configuration in the deployment environment.
Combine C# types, async I/O, validation, dependency injection, and tests in a practical service.