You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***When reviewing commit-by-commit, this can be skimmed***
10. Repoint inbound links across `docs/`. Critical: [docs/csharp/language-reference/compiler-messages/nullable-warnings.md](docs/csharp/language-reference/compiler-messages/nullable-warnings.md) has multiple links to moved files.
Copy file name to clipboardExpand all lines: docs/core/extensions/windows-service.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ After successfully adding the packages, your project file should now contain the
53
53
54
54
## Update project file
55
55
56
-
This worker project makes use of C#'s [nullable reference types](../../csharp/nullable-references.md). To enable them for the entire project, update the project file accordingly:
56
+
This worker project makes use of C#'s [nullable reference types](../../csharp/fundamentals/null-safety/nullable-reference-types.md). To enable them for the entire project, update the project file accordingly:
Copy file name to clipboardExpand all lines: docs/core/whats-new/dotnet-core-3-0.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ C# 8.0 is also part of this release, which includes the [nullable reference type
28
28
29
29
Tutorials related to C# 8.0 language features:
30
30
31
-
-[Tutorial: Express your design intent more clearly with nullable and non-nullable reference types](../../csharp/tutorials/nullable-reference-types.md)
31
+
-[Tutorial: Express your design intent more clearly with nullable and non-nullable reference types](../../csharp/fundamentals/tutorials/nullable-reference-types.md)
32
32
-[Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../csharp/asynchronous-programming/generate-consume-asynchronous-stream.md)
33
33
-[Tutorial: Use pattern matching to build type-driven and data-driven algorithms](../../csharp/fundamentals/tutorials/pattern-matching.md)
For reasons covered under [Generics nullability](../../nullable-references.md#generics) that technique might not produce the static analysis that matches your API. You might have a generic method that follows a similar pattern:
103
+
For reasons covered under [Generics nullability](../../fundamentals/null-safety/nullable-reference-types.md#generics) that technique might not produce the static analysis that matches your API. You might have a generic method that follows a similar pattern:
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/builtin-types/arrays.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ You can store multiple variables of the same type in an array data structure. Yo
28
28
type[] arrayName;
29
29
```
30
30
31
-
An array is a reference type, so the array can be a [nullable reference](../../nullable-references.md) type. The element types might be reference types, so you can declare an array to hold nullable reference types. The following example declarations show the different syntax used to declare the nullability of the array or the elements:
31
+
An array is a reference type, so the array can be a [nullable reference](../../fundamentals/null-safety/nullable-reference-types.md) type. The element types might be reference types, so you can declare an array to hold nullable reference types. The following example declarations show the different syntax used to declare the nullability of the array or the elements:
32
32
33
33
```csharp
34
34
type?[] arrayName; // non nullable array of nullable element types.
@@ -55,7 +55,7 @@ An array has the following properties:
55
55
- Array elements can be of any type, including an array type.
56
56
- Array types are [reference types](../keywords/reference-types.md) derived from the abstract base type <xref:System.Array>. All arrays implement <xref:System.Collections.IList> and <xref:System.Collections.IEnumerable>. You can use the [foreach](../statements/iteration-statements.md#the-foreach-statement) statement to iterate through an array. Single-dimensional arrays also implement <xref:System.Collections.Generic.IList`1> and <xref:System.Collections.Generic.IEnumerable`1>.
57
57
58
-
You can initialize the elements of an array to known values when you create the array. Beginning with C# 12, you can use a [Collection expression](../operators/collection-expressions.md) to initialize all of the collection types. Elements that you don't initialize are set to the [default value](default-values.md). The default value is the 0-bit pattern. All reference types (including [non-nullable](../../nullable-references.md#known-pitfalls) types) have the value `null`. All value types have the 0-bit patterns. That means the <xref:System.Nullable`1.HasValue?displayProperty=nameWithType> property is `false` and the <xref:System.Nullable`1.Value?displayProperty=nameWithType> property is undefined. In the .NET implementation, the `Value` property throws an exception.
58
+
You can initialize the elements of an array to known values when you create the array. Beginning with C# 12, you can use a [Collection expression](../operators/collection-expressions.md) to initialize all of the collection types. Elements that you don't initialize are set to the [default value](default-values.md). The default value is the 0-bit pattern. All reference types (including [non-nullable](../../fundamentals/null-safety/nullable-reference-types.md#known-pitfalls) types) have the value `null`. All value types have the 0-bit patterns. That means the <xref:System.Nullable`1.HasValue?displayProperty=nameWithType> property is `false` and the <xref:System.Nullable`1.Value?displayProperty=nameWithType> property is undefined. In the .NET implementation, the `Value` property throws an exception.
59
59
60
60
The following example creates single-dimensional, multidimensional, and jagged arrays:
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/builtin-types/nullable-reference-types.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ The preceding examples demonstrate how compiler's static analysis determines the
70
70
71
71
## Setting the nullable context
72
72
73
-
You can control the nullable context in two ways. At the project level, add the `<Nullable>enable</Nullable>` project setting. In a single C# source file, add the `#nullable enable` pragma to enable the nullable context. See the article on [setting a nullable strategy](../../nullable-migration-strategies.md). Before .NET 6, new projects use the default, `<Nullable>disable</Nullable>`. Beginning with .NET 6, new projects include the `<Nullable>enable</Nullable>` element in the project file.
73
+
You can control the nullable context in two ways. At the project level, add the `<Nullable>enable</Nullable>` project setting. In a single C# source file, add the `#nullable enable` pragma to enable the nullable context. See the article on [setting a nullable strategy](../../fundamentals/null-safety/migration-strategies.md). Before .NET 6, new projects use the default, `<Nullable>disable</Nullable>`. Beginning with .NET 6, new projects include the `<Nullable>enable</Nullable>` element in the project file.
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/compiler-messages/interface-implementation-errors.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,7 @@ You can correct these errors using the following techniques:
168
168
- Apply the `default` constraint to resolve ambiguities with nullable reference types in override and explicit interface implementations when using C# 9 or later (**CS0460**). This exception to the constraint inheritance rule allows you to explicitly specify the default constraint to disambiguate nullable annotation contexts.
169
169
- Explicitly specify `where T : class` or `where T : struct` constraints on override and explicit interface implementation methods when using C# 8 or later to enable nullable reference type annotations (**CS0460**). These specific constraints are permitted to support nullable reference type analysis on type parameters that are constrained to reference or value types.
170
170
171
-
For more information, see [Constraints on type parameters](../../programming-guide/generics/constraints-on-type-parameters.md), [Interfaces](../../fundamentals/types/interfaces.md), and [Nullable reference types](../../nullable-references.md).
171
+
For more information, see [Constraints on type parameters](../../programming-guide/generics/constraints-on-type-parameters.md), [Interfaces](../../fundamentals/types/interfaces.md), and [Nullable reference types](../../fundamentals/null-safety/nullable-reference-types.md).
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/compiler-messages/nullable-warnings.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -196,7 +196,7 @@ This article covers the following compiler warnings:
196
196
-[**CS8847**](#exhaustive-switch-expression) - *The switch expression does not handle some null inputs (it is not exhaustive). However, a pattern with a 'when' clause might successfully match this value.*
197
197
198
198
> [!NOTE]
199
-
> The static analysis can't always deduce in what order, in a specific scenario, methods are accessed, and whether the method completes successfully without throwing an exception. Those known pitfalls are well described in [Known pitfalls](../../nullable-references.md#known-pitfalls) section.
199
+
> The static analysis can't always deduce in what order, in a specific scenario, methods are accessed, and whether the method completes successfully without throwing an exception. Those known pitfalls are well described in [Known pitfalls](../../fundamentals/null-safety/nullable-reference-types.md#known-pitfalls) section.
200
200
201
201
You address almost all warnings using one of five techniques:
202
202
@@ -206,7 +206,7 @@ You address almost all warnings using one of five techniques:
206
206
- Adding attributes that describe null semantics.
207
207
- Initializing variables correctly.
208
208
209
-
If you're new to using nullable reference types, the [overview of nullable reference types](../../nullable-references.md) provides a background on what nullable reference types solve and how they work to provide warnings to possible mistakes in your code. You can also check the guidance on [migrating to nullable reference types](../../nullable-migration-strategies.md) to learn more about enabling nullable reference types in an existing project.
209
+
If you're new to using nullable reference types, the [overview of nullable reference types](../../fundamentals/null-safety/nullable-reference-types.md) provides a background on what nullable reference types solve and how they work to provide warnings to possible mistakes in your code. You can also check the guidance on [migrating to nullable reference types](../../fundamentals/null-safety/migration-strategies.md) to learn more about enabling nullable reference types in an existing project.
210
210
211
211
## Configure nullable context
212
212
@@ -240,8 +240,8 @@ The nullable context has two independent flags that control different aspects:
240
240
241
241
For detailed information about nullable contexts and migration strategies, see:
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/compiler-options/language.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ The **Nullable** option lets you specify the nullable context. It can be set in
149
149
<Nullable>enable</Nullable>
150
150
```
151
151
152
-
The argument must be one of `enable`, `disable`, `warnings`, or `annotations`. The `enable` argument enables the nullable context. Specifying `disable` will disable the nullable context. When you specify the `warnings` argument, the nullable warning context is enabled. When you specify the `annotations` argument, the nullable annotation context is enabled. The values are described and explained in the article on [Nullable contexts](../../nullable-references.md#nullable-context). You can learn more about the tasks involved in enabling nullable reference types in an existing codebase in our article on [nullable migration strategies](../../nullable-migration-strategies.md).
152
+
The argument must be one of `enable`, `disable`, `warnings`, or `annotations`. The `enable` argument enables the nullable context. Specifying `disable` will disable the nullable context. When you specify the `warnings` argument, the nullable warning context is enabled. When you specify the `annotations` argument, the nullable annotation context is enabled. The values are described and explained in the article on [Nullable contexts](../../fundamentals/null-safety/nullable-reference-types.md#nullable-context). You can learn more about the tasks involved in enabling nullable reference types in an existing codebase in our article on [nullable migration strategies](../../fundamentals/null-safety/migration-strategies.md).
153
153
154
154
> [!NOTE]
155
155
> When there's no value set, the default value `disable` is applied, however the .NET 6 templates are by default provided with the **Nullable** value set to `enable`.
0 commit comments