C#
A modern, statically-typed language central to the .NET ecosystem.
CurrentintermediateFull course available
Overview
C# is Microsoft's statically-typed, object-oriented language for the .NET platform, used for web backends (ASP.NET), desktop apps, and game development (Unity). It has evolved substantially, adding functional-style features (LINQ, pattern matching) on an object-oriented core.
- What it is
- A statically-typed, object-oriented language running on the .NET runtime.
- Why it's used
- For .NET web backends, Windows desktop applications, and Unity game development.
- Where it fits
- After general programming basics; typically alongside ASP.NET or .NET.
Core concepts
- Classes and interfaces
- Properties
- LINQ (query syntax over collections)
- Async/await
- Nullable reference types
Example
LINQ (Where here) lets you query collections declaratively, similar in spirit to JavaScript's array .filter() -- a hallmark of C#'s functional-influenced style.
var numbers = new List<int> { 1, 2, 3, 4 };
var evens = numbers.Where(n => n % 2 == 0).ToList();Common use cases
- ASP.NET web APIs
- Windows desktop applications
- Unity game development
Project ideas
- A small console app modeling a domain with classes and LINQ queries over a collection