Skip to content

Commit 09e749d

Browse files
BillWagnergewarren
andauthored
Remove "What's new in C# 10" (#43694)
* Remove "What's new in C# 10" Remove references to "Beginning in C# 10", and the "What's new in C# 10" article. * fix warnings and add the redirections * Move interpolated string handler tutorial This was a new feature in C# 10. Move this to the advanced / performance section. * move what's new pattern tutorial Perform edit pass fix open issues. * Final edit pass Fix bugs on edited articles, run an edit pass * fix tutorial link * Update toc.yml * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]>
1 parent 7721302 commit 09e749d

File tree

65 files changed

+296
-555
lines changed

Some content is hidden

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

65 files changed

+296
-555
lines changed

.openpublishing.redirection.csharp.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4174,7 +4174,7 @@
41744174
},
41754175
{
41764176
"source_path_from_root": "/docs/csharp/tutorials/exploration/patterns-objects.md",
4177-
"redirect_url": "/dotnet/csharp/whats-new/tutorials/patterns-objects"
4177+
"redirect_url": "/dotnet/csharp/tutorials/patterns-objects"
41784178
},
41794179
{
41804180
"source_path_from_root": "/docs/csharp/tutorials/exploration/records.md",
@@ -4297,13 +4297,17 @@
42974297
"source_path_from_root": "/docs/csharp/whats-new/csharp-7.md",
42984298
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-70"
42994299
},
4300+
{
4301+
"source_path_from_root": "/docs/csharp/whats-new/csharp-8.md",
4302+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-80"
4303+
},
43004304
{
43014305
"source_path_from_root": "/docs/csharp/whats-new/csharp-9.md",
43024306
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-9"
43034307
},
43044308
{
4305-
"source_path_from_root": "/docs/csharp/whats-new/csharp-8.md",
4306-
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-80"
4309+
"source_path_from_root": "/docs/csharp/whats-new/csharp-10.md",
4310+
"redirect_url": "/dotnet/csharp/whats-new/csharp-version-history#c-version-10"
43074311
},
43084312
{
43094313
"source_path_from_root": "/docs/csharp/whats-new/index.md",
@@ -4334,6 +4338,14 @@
43344338
"source_path_from_root": "/docs/csharp/whats-new/tutorials/ranges-indexes.md",
43354339
"redirect_url": "/dotnet/csharp/tutorials/ranges-indexes"
43364340
},
4341+
{
4342+
"source_path_from_root": "/docs/csharp/whats-new/tutorials/interpolated-string-handler.md",
4343+
"redirect_url": "/dotnet/csharp/advanced-topics/performance/interpolated-string-handler"
4344+
},
4345+
{
4346+
"source_path_from_root": "/docs/csharp/whats-new/tutorials/patterns-objects.md",
4347+
"redirect_url": "/dotnet/csharp/tutorials/patterns-objects"
4348+
},
43374349
{
43384350
"source_path_from_root": "/docs/csharp/write-safe-efficient-code.md",
43394351
"redirect_url": "/dotnet/csharp/advanced-topics/performance"

docs/core/tutorials/top-level-templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "C# console app template changes in .NET 6+"
33
description: The .NET 6+ project template for C# console apps uses top-level statements. Understand what changed and how to use existing learning materials with the new syntax.
4-
ms.date: 03/15/2024
4+
ms.date: 11/22/2024
55
---
66
# C# console app template generates top-level statements
77

@@ -34,7 +34,7 @@ namespace MyApp
3434

3535
In the preceding code, the actual namespace depends on the project name.
3636

37-
These two forms represent the same program. Both are valid with C# 10.0. When you use the newer version, you only need to write the body of the `Main` method. The compiler generates a `Program` class with an entry point method and places all your top level statements in that method. The name of the generated method isn't `Main`, it's an implementation detail that your code can't reference directly. You don't need to include the other program elements, the compiler generates them for you. You can learn more about the code the compiler generates when you use top level statements in the article on [top level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) in the C# Guide's fundamentals section.
37+
These two forms represent the same program. Both are valid in C#. When you use the newer version, you only need to write the body of the `Main` method. The compiler generates a `Program` class with an entry point method and places all your top level statements in that method. The name of the generated method isn't `Main`, it's an implementation detail that your code can't reference directly. You don't need to include the other program elements, the compiler generates them for you. You can learn more about the code the compiler generates when you use top level statements in the article on [top level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) in the C# Guide's fundamentals section.
3838

3939
You have two options to work with tutorials that aren't updated to use .NET 6+ templates:
4040

docs/core/tutorials/with-visual-studio-code.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create a .NET console application using Visual Studio Code
33
description: Learn how to create a .NET console application using Visual Studio Code.
4-
ms.date: 09/12/2024
4+
ms.date: 11/22/2024
55
zone_pivot_groups: dotnet-version
66
---
77
# Tutorial: Create a .NET console application using Visual Studio Code
@@ -168,7 +168,7 @@ Create a .NET console app project named "HelloWorld".
168168
169169
The code defines a class, `Program`, with a single method, `Main`, that takes a <xref:System.String> array as an argument. `Main` is the application entry point, the method that's called automatically by the runtime when it launches the application. Any command-line arguments supplied when the application is launched are available in the *args* array.
170170

171-
In the latest version of C#, a new feature named [top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) lets you omit the `Program` class and the `Main` method. Most existing C# programs don't use top-level statements, so this tutorial doesn't use this new feature. But it's available in C# 10, and whether you use it in your programs is a matter of style preference.
171+
In the latest version of C#, a new feature named [top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) lets you omit the `Program` class and the `Main` method. Most existing C# programs don't use top-level statements, so this tutorial doesn't use this new feature. But it's the current default for new C# programs. Whether you use it in your programs is a matter of style preference.
172172

173173
## Run the app
174174

docs/core/tutorials/with-visual-studio.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create a .NET console application using Visual Studio
33
description: Learn how to create a .NET console application with C# or Visual Basic using Visual Studio.
4-
ms.date: 03/21/2024
4+
ms.date: 11/22/2024
55
zone_pivot_groups: dotnet-version
66
dev_langs:
77
- "csharp"
@@ -186,7 +186,7 @@ Create a .NET console app project named "HelloWorld".
186186

187187
The code defines a class, `Program`, with a single method, `Main`, that takes a <xref:System.String> array as an argument. `Main` is the application entry point, the method that's called automatically by the runtime when it launches the application. Any command-line arguments supplied when the application is launched are available in the *args* array.
188188

189-
In the latest version of C#, a new feature named [top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) lets you omit the `Program` class and the `Main` method. Most existing C# programs don't use top-level statements, so this tutorial doesn't use this new feature. But it's available in C# 10, and whether you use it in your programs is a matter of style preference.
189+
In the latest version of C#, a new feature named [top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) lets you omit the `Program` class and the `Main` method. Most existing C# programs don't use top-level statements, so this tutorial doesn't use this new feature. But it's the current default for new C# programs. Whether you use it in your programs is a matter of style preference.
190190

191191
## Run the app
192192

@@ -306,7 +306,7 @@ Create a .NET console app project named "HelloWorld".
306306

307307
The code defines a class, `Program`, with a single method, `Main`, that takes a <xref:System.String> array as an argument. `Main` is the application entry point, the method that's called automatically by the runtime when it launches the application. Any command-line arguments supplied when the application is launched are available in the *args* array.
308308

309-
In the latest version of C#, a new feature named [top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) lets you omit the `Program` class and the `Main` method. Most existing C# programs don't use top-level statements, so this tutorial doesn't use this new feature. But it's available in C# 10, and whether you use it in your programs is a matter of style preference.
309+
In the latest version of C#, a new feature named [top-level statements](../../csharp/fundamentals/program-structure/top-level-statements.md) lets you omit the `Program` class and the `Main` method. Most existing C# programs don't use top-level statements, so this tutorial doesn't use this new feature. But it's the current default for new C# programs. Whether you use it in your programs is a matter of style preference.
310310

311311
## Run the app
312312

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ author: gewarren
1010

1111
.NET 6 delivers the final parts of the .NET unification plan that started with [.NET 5](dotnet-5.md). .NET 6 unifies the SDK, base libraries, and runtime across mobile, desktop, IoT, and cloud apps. In addition to this unification, the .NET 6 ecosystem offers:
1212

13-
- **Simplified development**: Getting started is easy. New language features in [C# 10](../../csharp/whats-new/csharp-10.md) reduce the amount of code you need to write. And investments in the web stack and minimal APIs make it easy to quickly write smaller, faster microservices.
13+
- **Simplified development**: Getting started is easy. New language features in [C# 10](../../csharp/whats-new/csharp-version-history.md#c-version-10) reduce the amount of code you need to write. And investments in the web stack and minimal APIs make it easy to quickly write smaller, faster microservices.
1414

1515
- **Better performance**: .NET 6 is the fastest full stack web framework, which lowers compute costs if you're running in the cloud.
1616

@@ -54,7 +54,7 @@ The .NET 6 release includes support for macOS Arm64 (or "Apple Silicon") and Win
5454

5555
## C# 10 and templates
5656

57-
C# 10 includes innovations such as `global using` directives, file-scoped namespace declarations, and record structs. For more information, see [What's new in C# 10](../../csharp/whats-new/csharp-10.md).
57+
C# 10 includes innovations such as `global using` directives, file-scoped namespace declarations, and record structs. For more information, see [C# Language version history](../../csharp/whats-new/csharp-version-history.md#c-version-10).
5858

5959
In concert with that work, the .NET SDK project templates for C# have been modernized to use some of the new language features:
6060

@@ -273,7 +273,6 @@ The new <xref:System.Collections.Generic.PriorityQueue%602> class represents a c
273273

274274
## See also
275275

276-
- [What's new in C# 10](../../csharp/whats-new/csharp-10.md)
277276
- [What's new in F# 6](../../fsharp/whats-new/fsharp-6.md)
278277
- [What's new in EF Core 6](/ef/core/what-is-new/ef-core-6.0/whatsnew)
279278
- [What's new in ASP.NET Core 6](/aspnet/core/release-notes/aspnetcore-6.0)

0 commit comments

Comments
 (0)