Skip to content

Commit 04f803e

Browse files
authored
Explain nullable value types in pattern matching tutorial (#46081)
* Explain nullable value types in pattern matching tutorial Fixes: #46065 - Write a short explanation for `?` at the beginning of the tutorial * Correct nullable value type link to Markdown file - Use link to markdown file and not to https page
1 parent 1348c9b commit 04f803e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/tour-of-csharp/tutorials/pattern-matching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This tutorial teaches you how to use pattern matching to inspect data in C#. You
1010
> [!TIP]
1111
> 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.
1212
13-
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.
13+
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.
1414

1515
## Match a value
1616

0 commit comments

Comments
 (0)