Skip to content

Commit bd6f8a3

Browse files
committed
Phase 5: Update links
***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.
1 parent fbdc688 commit bd6f8a3

18 files changed

Lines changed: 24 additions & 24 deletions

File tree

docs/core/compatibility/sdk/6.0/csharp-template-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Starting in .NET 6, the project templates that ship with the .NET SDK use the la
1111
- [Global using directives](/dotnet/csharp/language-reference/language-specification/namespaces#1452-global-using-alias-directives)
1212
- [File-scoped namespaces](/dotnet/csharp/language-reference/language-specification/namespaces#143-namespace-declarations)
1313
- [Target-typed new expressions](/dotnet/csharp/language-reference/language-specification/expressions#128172-object-creation-expressions)
14-
- [Nullable reference types](../../../../csharp/nullable-references.md)
14+
- [Nullable reference types](../../../../csharp/fundamentals/null-safety/nullable-reference-types.md)
1515
- [Async Main return values](../../../../csharp/fundamentals/program-structure/main-command-line.md#main-return-values)
1616

1717
Some of the latest C# language features are not supported by previous target frameworks, so you might experience issues in the following scenarios:

docs/core/extensions/windows-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ After successfully adding the packages, your project file should now contain the
5353

5454
## Update project file
5555

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:
5757

5858
:::code language="xml" source="snippets/workers/windows-service/App.WindowsService.csproj" range="1-7,12-20" highlight="5":::
5959

docs/core/whats-new/dotnet-5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ASP.NET Core 5.0 is based on .NET 5 but retains the name "Core" to avoid confusi
2424
- [App trimming](https://devblogs.microsoft.com/dotnet/app-trimming-in-net-5)
2525
- Windows Arm64 and Arm64 intrinsics
2626
- Tooling support for dump debugging
27-
- The runtime libraries are 80% annotated for [nullable reference types](../../csharp/nullable-references.md)
27+
- The runtime libraries are 80% annotated for [nullable reference types](../../csharp/fundamentals/null-safety/nullable-reference-types.md)
2828
- Performance improvements:
2929
- [Garbage Collection (GC)](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/#gc)
3030
- [System.Text.Json](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/#json)

docs/core/whats-new/dotnet-core-3-0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ C# 8.0 is also part of this release, which includes the [nullable reference type
2828

2929
Tutorials related to C# 8.0 language features:
3030

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)
3232
- [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../csharp/asynchronous-programming/generate-consume-asynchronous-stream.md)
3333
- [Tutorial: Use pattern matching to build type-driven and data-driven algorithms](../../csharp/fundamentals/tutorials/pattern-matching.md)
3434

docs/csharp/language-reference/attributes/nullable-analysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ You likely wrote a method like this to return `null` when the name sought isn't
100100
public Customer? FindCustomer(string lastName, string firstName)
101101
```
102102

103-
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:
104104

105105
:::code language="csharp" source="snippets/NullableAttributes.cs" ID="FindMethod" :::
106106

docs/csharp/language-reference/builtin-types/arrays.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You can store multiple variables of the same type in an array data structure. Yo
2828
type[] arrayName;
2929
```
3030

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:
3232

3333
```csharp
3434
type?[] arrayName; // non nullable array of nullable element types.
@@ -55,7 +55,7 @@ An array has the following properties:
5555
- Array elements can be of any type, including an array type.
5656
- 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>.
5757

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.
5959

6060
The following example creates single-dimensional, multidimensional, and jagged arrays:
6161

docs/csharp/language-reference/builtin-types/nullable-reference-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The preceding examples demonstrate how compiler's static analysis determines the
7070

7171
## Setting the nullable context
7272

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.
7474

7575
## C# language specification
7676

docs/csharp/language-reference/compiler-messages/interface-implementation-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ You can correct these errors using the following techniques:
168168
- 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.
169169
- 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.
170170

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).
172172

173173
## Method visibility and modifiers
174174

docs/csharp/language-reference/compiler-messages/nullable-warnings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ This article covers the following compiler warnings:
196196
- [**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.*
197197

198198
> [!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.
200200
201201
You address almost all warnings using one of five techniques:
202202

@@ -206,7 +206,7 @@ You address almost all warnings using one of five techniques:
206206
- Adding attributes that describe null semantics.
207207
- Initializing variables correctly.
208208

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.
210210

211211
## Configure nullable context
212212

@@ -240,8 +240,8 @@ The nullable context has two independent flags that control different aspects:
240240

241241
For detailed information about nullable contexts and migration strategies, see:
242242

243-
- [Nullable reference types overview](../../nullable-references.md#nullable-context)
244-
- [Update a codebase with nullable reference types](../../nullable-migration-strategies.md)
243+
- [Nullable reference types overview](../../fundamentals/null-safety/nullable-reference-types.md#nullable-context)
244+
- [Update a codebase with nullable reference types](../../fundamentals/null-safety/migration-strategies.md)
245245

246246
## Incorrect annotation syntax
247247

docs/csharp/language-reference/compiler-options/language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ The **Nullable** option lets you specify the nullable context. It can be set in
149149
<Nullable>enable</Nullable>
150150
```
151151

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).
153153

154154
> [!NOTE]
155155
> 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

Comments
 (0)