From d4132b18914fdec9f6244cef3c0e6e0985de0ba0 Mon Sep 17 00:00:00 2001 From: lubugit <104265759+lubugit@users.noreply.github.com> Date: Sun, 11 May 2025 11:55:56 +0200 Subject: [PATCH 1/2] Explain nullable value types in pattern matching tutorial Fixes: #46065 - Write a short explanation for `?` at the beginning of the tutorial --- docs/csharp/tour-of-csharp/tutorials/pattern-matching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md b/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md index 50092e7b79148..cc893c3add539 100644 --- a/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md +++ b/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md @@ -10,7 +10,7 @@ This tutorial teaches you how to use pattern matching to inspect data in C#. You > [!TIP] > When a code snippet block includes the "Run" button, that button opens the interactive window, or replaces the existing code in the interactive window. When the snippet doesn't include a "Run" button, you can copy the code and add it to the current interactive window. -The preceding tutorials demonstrated built-in types and types you define as tuples or records. Instances of these types can be checked against a *pattern*. Whether an instance matches a pattern determines the actions your program takes. Let's start to explore how you can use patterns. +The preceding tutorials demonstrated built-in types and types you define as tuples or records. Instances of these types can be checked against a *pattern*. Whether an instance matches a pattern determines the actions your program takes. In the examples below, you'll notice `?` after type names. This symbol allows the value of this type to be null (e.g., `bool?` can be `true`, `false` or `null`). For more information, see [Nullable value types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/nullable-value-types). Let's start to explore how you can use patterns. ## Match a value From 567a7e6158e7e00d915b3dd3f18f6d2b1afd911b Mon Sep 17 00:00:00 2001 From: lubugit <104265759+lubugit@users.noreply.github.com> Date: Sun, 11 May 2025 15:07:28 +0200 Subject: [PATCH 2/2] Correct nullable value type link to Markdown file - Use link to markdown file and not to https page --- docs/csharp/tour-of-csharp/tutorials/pattern-matching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md b/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md index cc893c3add539..e090e45c0551e 100644 --- a/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md +++ b/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md @@ -10,7 +10,7 @@ This tutorial teaches you how to use pattern matching to inspect data in C#. You > [!TIP] > When a code snippet block includes the "Run" button, that button opens the interactive window, or replaces the existing code in the interactive window. When the snippet doesn't include a "Run" button, you can copy the code and add it to the current interactive window. -The preceding tutorials demonstrated built-in types and types you define as tuples or records. Instances of these types can be checked against a *pattern*. Whether an instance matches a pattern determines the actions your program takes. In the examples below, you'll notice `?` after type names. This symbol allows the value of this type to be null (e.g., `bool?` can be `true`, `false` or `null`). For more information, see [Nullable value types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/nullable-value-types). Let's start to explore how you can use patterns. +The preceding tutorials demonstrated built-in types and types you define as tuples or records. Instances of these types can be checked against a *pattern*. Whether an instance matches a pattern determines the actions your program takes. In the examples below, you'll notice `?` after type names. This symbol allows the value of this type to be null (e.g., `bool?` can be `true`, `false` or `null`). For more information, see [Nullable value types](../../language-reference/builtin-types/nullable-value-types.md). Let's start to explore how you can use patterns. ## Match a value