Skip to content

Commit e99e04d

Browse files
Update testAppsTopLevel.md (#34763)
* Update testAppsTopLevel.md Fixes #34725 * Update aspnetcore/release-notes/aspnetcore-10/includes/testAppsTopLevel.md * Update link for 'internal' keyword reference
1 parent 07969bc commit e99e04d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aspnetcore/release-notes/aspnetcore-10/includes/testAppsTopLevel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
### Better support for testing apps with top-level statements
22

3-
.NET 10 now has better support for testing apps that use top-level statements. Previously developers had to manually add `public partial class Program` to the `Program.cs` file so that the test project could reference the `Program class`. This is because the top-level statement feature in C# 9 generated a `Program class` that was declared as internal.
3+
.NET 10 now has better support for testing apps that use [top-level statements](/dotnet/csharp/fundamentals/program-structure/top-level-statements). Previously developers had to manually add `public partial class Program` to the `Program.cs` file so that the test project could reference the `Program class`. `public partial class Program` was required because the top-level statement feature in C# 9 generated a `Program class` that was declared as [internal](/dotnet/csharp/language-reference/keywords/internal).
44

5-
In .NET 10, a source generator is used to generate the `public partial class Program` declaration if the programmer did not declare it explicitly. In addition, an analyzer was added to detect when `public partial class Program` is declared explicitly and advise the developer to remove it.
5+
In .NET 10, a [source generator](/shows/on-dotnet/c-source-generators) is used to generate the `public partial class Program` declaration if the programmer didn't declare it explicitly. Additionally, an analyzer was added to detect when `public partial class Program` is declared explicitly and advise the developer to remove it.
66

77
![Image](https://github.com/user-attachments/assets/a37f0c81-a58a-453f-8da5-fa49356ca180)
88

0 commit comments

Comments
 (0)