After launching .NET 5 and C## 9, I was utterly obsessed with the Top Level Program (a.k.a. TLP) feature. TLP delivers quick and fast prototyping for the .NET application and makes the most immediate entries for my work.

But TLP is just syntax sugar, not a complete solution. So there are little details you should know before choose TLP.

Thread Apartment Model

This detail is a rare case but critical for the Windows application developers. Usually, the Main method does not require particular attributes, excluding the Windows desktop application area. That thing is the thread apartment model, which impacts the Windows Forms or WPF application.

#dotnet #programming #csharp #coding #c# 9

Some details about the Top Level Program in C# 9
1.20 GEEK