C#idiomatic C#

dotnet/docs @71e366e538 · snapshot 2026-09-18 · 1132 pages · C# 14 · .NET 10

Microsoft’s C# documentation, as one readable site.

The language guide, the base library, async and LINQ, and the whole CA and IDE analyzer catalog: snapshotted from dotnet/docs, indexed where you would look, and linked back to the live page on Microsoft Learn.

Try a rule id such as CA1031, or a topic such as spans.

CA1418: Validate platform compatibility
csharp
[SupportedOSPlatform("Solaris")] // Warns: The platform 'Solaris' is not a known platform name.
public void SolarisApi() { }
warningInteroperability · enabled by default in .net 10Open the rule
Language C# as a language: syntax, types, statements, and the conventions the team ships in the box. 337 2.6 MB Code analysis Microsoft’s own analyzer catalog. Every CA and IDE rule, what it wants, and how to configure it. 471 2.8 MB Core library The base class library that C# idiom is built on: strings, equality, collections, generics, memory, events. 126 1.9 MB Async and concurrency async and await, tasks, dataflow, and the rules for running work in parallel. 105 0.9 MB Advanced What the compiler does under the language: the runtime, the type system, and the toolchain. 33 0.3 MB LINQ Query syntax, standard query operators, and how they compose. 22 0.2 MB .NET releases What each .NET release added, which line is supported, and what "current" means. 24 0.6 MB Idioms The corpus distilled: what to reach for, what to avoid, and the page behind every call. 14 0.1 MB

Start here

The catalog

What is current

About this corpus

What is in the snapshot

  • 1132 pages, 9.3 MB
  • 1,604 code samples in the pages, 3.2 MB
  • 225 pages carry C# samples
  • 142 pages Microsoft marks as AI-assisted