4 ms·
> .NET 6 seems to be different to .NET Framework and different to .NET Core in the way it handles even simple things like namespaces, using declarations and oth
by Mindless2112 4y ago
> .NET 6 seems to be different to .NET Framework and different to .NET Core in the way it handles even simple things like namespaces, using declarations and other language features.
Those are C# language features, not necessarily .NET 6 features:
• https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10#file-scoped-namespace-declaration https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...
• https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-10#global-using-directives https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs...
"global using" is a code readability regression, so I wish it had not been added and I'd recommend against using it.
- runevault 4y agoGlobal using is one of the only new features I'm not a fan of. I get the idea but it can really damage readability.
- david_allison 4y ago> "global using" is a code readability regression, so I wish it had not been added and I'd recommend against using it. As a counterpoint: it's handy for Unit Test projects where you always want to import the test framework.
- deleted 4y ago[deleted]
- Kwpolska 4y agoYeah, those are optional language features. Namespaces with braces work just fine, and any other language features that are too fancy can be easily disabled in your .csproj (sometimes by downgrading to an older LangVersion).