Skip to content

Commit fba3585

Browse files
BillWagnertdykstra
andauthored
Move feature tutorials to what's new (#23434)
* Move tutorials to what's new These tutorials guide readers to explore new features. Put them under the whats-new section for better visibility. * fix build errors mostly moving the snippet folders. Also, fix a few links. * fix one last build warning * Apply suggestions from code review Co-authored-by: Tom Dykstra <tdykstra@microsoft.com> Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
1 parent 4bade28 commit fba3585

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+109
-100
lines changed

.openpublishing.redirection.json

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2980,7 +2980,27 @@
29802980
},
29812981
{
29822982
"source_path": "docs/csharp/tutorials/default-interface-members-versions.md",
2983-
"redirect_url": "/dotnet/csharp/tutorials/default-interface-methods-versions"
2983+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/default-interface-methods-versions"
2984+
},
2985+
{
2986+
"source_path": "docs/csharp/tutorials/generate-consume-asynchronous-stream.md",
2987+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/generate-consume-asynchronous-stream"
2988+
},
2989+
{
2990+
"source_path": "docs/csharp/tutorials/mixins-with-default-interface-methods.md",
2991+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/mixins-with-default-interface-methods"
2992+
},
2993+
{
2994+
"source_path": "docs/csharp/tutorials/nullable-reference-types.md",
2995+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/nullable-reference-types"
2996+
},
2997+
{
2998+
"source_path": "docs/csharp/tutorials/ranges-indexes.md",
2999+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/ranges-indexes"
3000+
},
3001+
{
3002+
"source_path": "docs/csharp/tutorials/upgrade-to-nullable-references.md",
3003+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/upgrade-to-nullable-references"
29843004
},
29853005
{
29863006
"source_path": "docs/csharp/tutorials/exploration/csharp-6.yml",
@@ -2990,6 +3010,18 @@
29903010
"source_path": "docs/csharp/tutorials/exploration/csharp-7.yml",
29913011
"redirect_url": "/dotnet/csharp/whats-new/csharp-7"
29923012
},
3013+
{
3014+
"source_path": "docs/csharp/tutorials/exploration/patterns-objects.md",
3015+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/patterns-objects"
3016+
},
3017+
{
3018+
"source_path": "docs/csharp/tutorials/exploration/records.md",
3019+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/records"
3020+
},
3021+
{
3022+
"source_path": "docs/csharp/tutorials/exploration/top-level-statements.md",
3023+
"redirect_url": "/dotnet/csharp/whats-new/tutorials/top-level-statements"
3024+
},
29933025
{
29943026
"source_path": "docs/csharp/tutorials/intro-to-csharp/index.md",
29953027
"redirect_url": "/dotnet/csharp/tour-of-csharp/tutorials/"
@@ -3026,7 +3058,10 @@
30263058
"source_path": "docs/csharp/tutorials/intro-to-csharp/arrays-and-collections.md",
30273059
"redirect_url": "/dotnet/csharp/tour-of-csharp/tutorials/arrays-and-collections"
30283060
},
3029-
3061+
{
3062+
"source_path": "docs/csharp/tutorials/index.md",
3063+
"redirect_url": "/dotnet/csharp/tutorials/intro-to-csharp/introduction-to-classes"
3064+
},
30303065
{
30313066
"source_path": "docs/csharp/tutorials/intro-to-csharp/interpolated-strings-local.md",
30323067
"redirect_url": "/dotnet/csharp/tutorials/exploration/interpolated-strings-local"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ C# 8.0 is also part of this release, which includes the [nullable reference type
2626

2727
Tutorials related to C# 8.0 language features:
2828

29-
- [Tutorial: Express your design intent more clearly with nullable and non-nullable reference types](../../csharp/tutorials/nullable-reference-types.md)
30-
- [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../csharp/tutorials/generate-consume-asynchronous-stream.md)
29+
- [Tutorial: Express your design intent more clearly with nullable and non-nullable reference types](../../csharp/whats-new/tutorials/nullable-reference-types.md)
30+
- [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../csharp/whats-new/tutorials/generate-consume-asynchronous-stream.md)
3131
- [Tutorial: Use pattern matching to build type-driven and data-driven algorithms](../../csharp/tutorials/pattern-matching.md)
3232

3333
Language enhancements were added to support the following API features detailed below:
@@ -450,7 +450,7 @@ There's also the <xref:System.Range?displayProperty=nameWithType> type, which co
450450
var slice = a[i1..i2]; // { 3, 4, 5 }
451451
```
452452

453-
For more information, see the [ranges and indices tutorial](../../csharp/tutorials/ranges-indexes.md).
453+
For more information, see the [ranges and indices tutorial](../../csharp/whats-new/tutorials/ranges-indexes.md).
454454

455455
### Async streams
456456

@@ -470,7 +470,7 @@ async IAsyncEnumerable<int> GetBigResultsAsync()
470470

471471
In addition to being able to `await foreach`, you can also create async iterators, for example, an iterator that returns an `IAsyncEnumerable/IAsyncEnumerator` that you can both `await` and `yield` in. For objects that need to be disposed, you can use `IAsyncDisposable`, which various BCL types implement, such as `Stream` and `Timer`.
472472

473-
For more information, see the [async streams tutorial](../../csharp/tutorials/generate-consume-asynchronous-stream.md).
473+
For more information, see the [async streams tutorial](../../csharp/whats-new/tutorials/generate-consume-asynchronous-stream.md).
474474

475475
### IEEE Floating-point
476476

docs/csharp/language-reference/operators/await.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ For more information, see the [Await expressions](~/_csharplang/spec/expressions
5555
- [Asynchronous programming](../../async.md)
5656
- [Async in depth](../../../standard/async-in-depth.md)
5757
- [Walkthrough: accessing the Web by using async and await](../../programming-guide/concepts/async/index.md)
58-
- [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../tutorials/generate-consume-asynchronous-stream.md)
58+
- [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](../../whats-new/tutorials/generate-consume-asynchronous-stream.md)

docs/csharp/language-reference/operators/member-access-operators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Available in C# 8.0 and later, the `^` operator indicates the element position f
176176

177177
As the preceding example shows, expression `^e` is of the <xref:System.Index?displayProperty=nameWithType> type. In expression `^e`, the result of `e` must be implicitly convertible to `int`.
178178

179-
You can also use the `^` operator with the [range operator](#range-operator-) to create a range of indices. For more information, see [Indices and ranges](../../tutorials/ranges-indexes.md).
179+
You can also use the `^` operator with the [range operator](#range-operator-) to create a range of indices. For more information, see [Indices and ranges](../../whats-new/tutorials/ranges-indexes.md).
180180

181181
## Range operator ..
182182

@@ -194,7 +194,7 @@ You can omit any of the operands of the `..` operator to obtain an open-ended ra
194194

195195
[!code-csharp[ranges with omitted operands](snippets/shared/MemberAccessOperators.cs#RangesOptional)]
196196

197-
For more information, see [Indices and ranges](../../tutorials/ranges-indexes.md).
197+
For more information, see [Indices and ranges](../../whats-new/tutorials/ranges-indexes.md).
198198

199199
## Operator overloadability
200200

docs/csharp/nullable-references.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,6 @@ In the preceding example, the declaration of the array shows it holds non-nullab
210210
## See also
211211

212212
- [Draft nullable reference types specification](~/_csharplang/proposals/csharp-9.0/nullable-reference-types-specification.md)
213-
- [Intro to nullable references tutorial](tutorials/nullable-reference-types.md)
213+
- [Intro to nullable references tutorial](whats-new/tutorials/nullable-reference-types.md)
214214
- [Migrate an existing codebase to nullable references](tutorials/upgrade-to-nullable-references.md)
215215
- [**Nullable** (C# Compiler option)](language-reference/compiler-options/language.md#nullable)

docs/csharp/programming-guide/interfaces/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ A base class can also implement interface members by using virtual members. In t
4545

4646
An interface has the following properties:
4747

48-
- An interface is typically like an abstract base class with only abstract members. Any class or struct that implements the interface must implement all its members. Optionally, an interface may define default implementations for some or all of its members. For more information, see [default interface methods](../../tutorials/default-interface-methods-versions.md).
48+
- An interface is typically like an abstract base class with only abstract members. Any class or struct that implements the interface must implement all its members. Optionally, an interface may define default implementations for some or all of its members. For more information, see [default interface methods](../../whats-new/tutorials/default-interface-methods-versions.md).
4949
- An interface can't be instantiated directly. Its members are implemented by any class or struct that implements the interface.
5050
- A class or struct can implement multiple interfaces. A class can inherit a base class and also implement one or more interfaces.
5151

docs/csharp/toc.yml

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -35,41 +35,55 @@ items:
3535
href: tour-of-csharp/tutorials/branches-and-loops-local.md
3636
- name: List collections
3737
href: tour-of-csharp/tutorials/arrays-and-collections.md
38+
- name: What's new in C#
39+
items:
40+
- name: C# 9.0
41+
displayName: what's new
42+
href: whats-new/csharp-9.md
43+
- name: C# 8.0
44+
href: whats-new/csharp-8.md
45+
- name: C# 7.0-7.3
46+
href: whats-new/csharp-7.md
47+
- name: Compiler breaking changes
48+
href: whats-new/breaking-changes.md
49+
- name: C# Version History
50+
href: whats-new/csharp-version-history.md
51+
- name: Relationships to .NET library
52+
href: whats-new/relationships-between-language-and-library.md
53+
- name: Version compatibility
54+
href: whats-new/version-update-considerations.md
55+
- name: Tutorials
56+
items:
57+
- name: Explore record types
58+
href: whats-new/tutorials/records.md
59+
- name: Explore top level statements
60+
href: whats-new/tutorials/top-level-statements.md
61+
- name: Explore patterns in objects
62+
href: whats-new/tutorials/patterns-objects.md
63+
- name: Safely update interfaces with default interface methods
64+
href: whats-new/tutorials/default-interface-methods-versions.md
65+
- name: Create mixin functionality with default interface methods
66+
href: whats-new/tutorials/mixins-with-default-interface-methods.md
67+
- name: Explore indexes and ranges
68+
href: whats-new/tutorials/ranges-indexes.md
69+
- name: Work with nullable reference types
70+
href: whats-new/tutorials/nullable-reference-types.md
71+
- name: Upgrade an app to nullable reference types
72+
href: whats-new/tutorials/upgrade-to-nullable-references.md
73+
- name: Generate and consume asynchronous streams
74+
href: whats-new/tutorials/generate-consume-asynchronous-stream.md
3875
- name: Tutorials
3976
items:
40-
- name: Overview
41-
displayName: tutorials
42-
href: tutorials/index.md
4377
- name: Introduction to classes
4478
href: tutorials/intro-to-csharp/introduction-to-classes.md
4579
- name: Object-Oriented programming
4680
href: tutorials/intro-to-csharp/object-oriented-programming.md
47-
- name: Explore record types
48-
href: tutorials/exploration/records.md
49-
- name: Explore top level statements
50-
href: tutorials/exploration/top-level-statements.md
51-
- name: Explore patterns in objects
52-
href: tutorials/exploration/patterns-objects.md
5381
- name: Explore string interpolation - interactive
5482
href: tutorials/exploration/interpolated-strings.yml
5583
- name: Explore string interpolation - in your environment
5684
href: tutorials/exploration/interpolated-strings-local.md
5785
- name: Advanced scenarios for string Interpolation
5886
href: tutorials/string-interpolation.md
59-
- name: Safely update interfaces with default interface methods
60-
href: tutorials/default-interface-methods-versions.md
61-
- name: Create mixin functionality with default interface methods
62-
href: tutorials/mixins-with-default-interface-methods.md
63-
- name: Explore indexes and ranges
64-
href: tutorials/ranges-indexes.md
65-
- name: Work with nullable reference types
66-
href: tutorials/nullable-reference-types.md
67-
- name: Upgrade an app to nullable reference types
68-
href: tutorials/upgrade-to-nullable-references.md
69-
- name: Generate and consume asynchronous streams
70-
href: tutorials/generate-consume-asynchronous-stream.md
71-
- name: Build data-driven algorithms with pattern matching
72-
href: tutorials/pattern-matching.md
7387
- name: Console Application
7488
href: tutorials/console-teleprompter.md
7589
- name: REST Client
@@ -80,23 +94,8 @@ items:
8094
href: tutorials/working-with-linq.md
8195
- name: Use Attributes
8296
href: tutorials/attributes.md
83-
- name: What's new in C#
84-
items:
85-
- name: C# 9.0
86-
displayName: what's new
87-
href: whats-new/csharp-9.md
88-
- name: C# 8.0
89-
href: whats-new/csharp-8.md
90-
- name: C# 7.0-7.3
91-
href: whats-new/csharp-7.md
92-
- name: Breaking changes in the compiler
93-
href: whats-new/breaking-changes.md
94-
- name: C# Version History
95-
href: whats-new/csharp-version-history.md
96-
- name: Relationships between language and framework
97-
href: whats-new/relationships-between-language-and-library.md
98-
- name: Version and update considerations
99-
href: whats-new/version-update-considerations.md
97+
- name: Build data-driven algorithms with pattern matching
98+
href: tutorials/pattern-matching.md
10099
- name: C# concepts
101100
items:
102101
- name: C# type system

docs/csharp/tutorials/index.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)