Skip to content

PR 8 — Null Safety: Overview, Nullable Value Types, Null Operators#53509

Open
BillWagner wants to merge 5 commits intodotnet:mainfrom
BillWagner:null-safety-overview
Open

PR 8 — Null Safety: Overview, Nullable Value Types, Null Operators#53509
BillWagner wants to merge 5 commits intodotnet:mainfrom
BillWagner:null-safety-overview

Conversation

@BillWagner
Copy link
Copy Markdown
Member

@BillWagner BillWagner commented Apr 30, 2026

Fixes #52837

Create the fundamentals/null-safety/ directory and three new articles (overview, nullable value types, null operators) with three corresponding snippet projects, then insert the section into toc.yml. All are brand-new files — no redirects needed. PR 9 handles the NRT, resolve-warnings, migration, and tutorial articles.


Internal previews

📄 File 🔗 Preview link
docs/csharp/fundamentals/null-safety/index.md C# null safety
docs/csharp/fundamentals/null-safety/null-operators.md C# null operators
docs/csharp/fundamentals/null-safety/nullable-value-types.md "Nullable value types: C# Fundamentals"
docs/csharp/toc.yml Taken from https://github.com/dotnet/roslyn/wiki/Samples-and-Walkthroughs

@dotnetrepoman dotnetrepoman Bot added this to the April 2026 milestone Apr 30, 2026
@BillWagner BillWagner marked this pull request as ready for review May 1, 2026 15:11
@BillWagner BillWagner requested a review from a team as a code owner May 1, 2026 15:11
Copilot AI review requested due to automatic review settings May 1, 2026 15:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Null safety subsection to the C# Fundamentals docs, with three new articles and corresponding runnable snippet projects to support the content.

Changes:

  • Adds a Null safety node to docs/csharp/toc.yml with links to three new Fundamentals articles.
  • Introduces three new articles: overview, nullable value types, and null operators.
  • Adds three new snippet projects (one per article) with sample code referenced via :::code includes.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/csharp/toc.yml Adds the new Null safety subsection and links to the three new articles.
docs/csharp/fundamentals/null-safety/index.md New overview article introducing null safety concepts and linking to related pages/snippets.
docs/csharp/fundamentals/null-safety/nullable-value-types.md New article explaining nullable value types with referenced runnable snippets.
docs/csharp/fundamentals/null-safety/null-operators.md New article covering null-related operators, including examples and referenced runnable snippets.
docs/csharp/fundamentals/null-safety/snippets/null-safety-overview/null-safety-overview.csproj New snippet project for the overview article.
docs/csharp/fundamentals/null-safety/snippets/null-safety-overview/Program.cs New overview snippets demonstrating null checks, NVT/NRT basics, and operator quick reference.
docs/csharp/fundamentals/null-safety/snippets/nullable-value-types/nullable-value-types.csproj New snippet project for nullable value types.
docs/csharp/fundamentals/null-safety/snippets/nullable-value-types/Program.cs New snippets demonstrating declaration, checks, fallbacks, and lifted operators for nullable value types.
docs/csharp/fundamentals/null-safety/snippets/null-operators/null-operators.csproj New snippet project for null operators.
docs/csharp/fundamentals/null-safety/snippets/null-operators/Program.cs New snippets demonstrating ?., ?[], ??, ??=, is null, and !.

Comment thread docs/csharp/fundamentals/null-safety/index.md Outdated
BillWagner and others added 5 commits May 6, 2026 10:34
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@BillWagner BillWagner force-pushed the null-safety-overview branch from 7a88257 to 1874850 Compare May 6, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Everyday C#] Phase C PR 8: Null safety: overview, nullable value types, null operators

2 participants