C# is a statically typed, object-oriented language with strong functional features, and .NET is the platform it runs on: a runtime, a large class library and tools. Together they build web services, desktop and mobile apps, games and command-line tools on Windows, Linux and macOS. Other languages, such as F#, share the same runtime.
Key concepts
- Managed runtime: code compiles to an intermediate language that the runtime compiles to machine code and manages, with garbage collection.
- Types: classes, structs, interfaces, records, generics and nullable reference types.
- LINQ: queries over collections written in the language, in a functional style.
- Async and await: asynchronous code that reads like sequential code.
- Base class library: collections, files, networking, text and dependency injection ready to use.
- Packages and projects: a project file, a package manager and a command-line tool drive builds.
Vocabulary
- CLR: the common language runtime that executes .NET code.
- Assembly: the unit of compiled code and metadata, a dll or an executable.
- Delegate: a typed reference to a method, the base of events and lambdas.
- Dependency injection: passing a component its collaborators instead of creating them inside.
What to study, in order
- Syntax, types, control flow and the command-line tool for creating and running a console app.
- Classes, interfaces, generics and collections; model a small domain.
- LINQ and lambdas to query and transform data.
- Async and await with files and HTTP requests.
- A web API or desktop app with tests and dependency injection.
- Read about the garbage collector and about value types to avoid needless allocations.