.NET Digest #2

Welcome to the second issue of our digest dedicated to news and events in the world of .NET! You liked the first issue, so the C# team of PVS-Studio has once again collected the most interesting and useful materials for you. Let's go!

We are trying to improve, so we will be glad to receive your comments and suggestions 🙂

Feel free to send us interesting materials via feedback forms!

Today's digest: .NET 9 Preview 6, articles about new language features, end of support for .NET 6, and much more.

Main news

.NET 9 Preview 6. Microsoft has released the latest preview version. The next step should be Release Candidate 1. Let's briefly list the main changes:

  • Improvements in System.Numerics And System.Text.Json;

  • Attribute [GeneratedRegex] can now be applied to properties;

  • New types OrderedDictionary And ReadOnlySet;

  • allows ref struct to constrain a generic parameter to tell the compiler and runtime that a generic parameter can be used ref struct;

  • NuGetAudit now warns about vulnerabilities in transitive dependencies;

  • New tool dotnet nuget why to find out why a transitive dependency is used in a project;

  • MSBuild BuildChecks to detect problems during the build phase.

.NET 6 will reach End of Support on November 12, 2024. Microsoft will stop supporting .NET 6. No new security updates will be released. Technical support for .NET 6 will cease. Also, when building, you will receive a warning about an unsupported version. It is recommended to switch to .NET 8.

Video

A Complete .NET Developer's Guide to Span with Stephen Toub. A great video tutorial about Span in .NET by Stephen Tobe.

Articles

.NET and .NET Framework July 2024 servicing releases updates.NET and .NET Framework update news are now combined into one. The July update fixed various vulnerabilities.

C# 13: Explore the latest preview features. In this article, Microsoft talks about the new features in C# 13, available in the latest preview. This is a great opportunity to learn more about the improvements params And index operator, new lock an object, partial properties, allows ref struct and other.

The developers also announced that the extension types that were supposed to appear in C# 13 will appear only in C# 14 (.NET 10). This is sad, but better than getting a raw feature.

What's new in .NET Aspire 8.1 for cloud native developers! The new .NET Aspire 8.1 brings support for creating container images via AddDockerfile(…)orchestrating Python code with AddPythonProject(…) and other improvements for telemetry testing. New components were also added, such as: Keycloak, Elasticsearch, Garnet, Valkey, Kafka UI and others.

Speaking of Garnet, we recently released article about checking the source code of Microsoft Garnet with the PVS-Studio static analyzer.

Dive into native Windows development with new WinUI workload and template improvements. Microsoft recommends using WinUI for developing applications on Windows. Now there are new workloads and templates for creating projects.

Behind the scenes of collection expressions. Andrew Lock concludes his series on collection expressions. New articles:

Disambiguating types with the same name with extern alias. Andrew Locke looks at the problem of using two libraries that have the same type names and namespaces. This is a very rare case, but knowing how to avoid compilation errors and deal with this situation is useful.

Cloned Dictionary vs. Immutable Dictionary vs. Frozen Dictionary in high traffic systems. The author compares the efficiency of different dictionary implementations under high system load. He talks about which dictionary type can be inefficient due to high memory allocation costs and which works slowly due to the need to allocate memory for each operation.

CREATING HASHES IN .NETThis article covers various methods for creating hashes in .NET. Hashes are useful for one-way encryption, which is used to securely store passwords and other sensitive data. They are also used to verify JWTs and in many other scenarios.

C# Design Patterns – Iterator – Language Features. The author describes C#'s built-in support for the iterator pattern: IEnumerator, IEnumerable And IAsyncEnumerable.

Why and How to Execute GraphQL Queries in .NETThis post covers how to query a GraphQL API in .NET using the Strawberry Shake library in a console application.

Adding Serilog to ASP.NET Core: a practical guide. Serilog is a logging library. You can use it on its own, but it is also compatible with Microsoft.Extensions.Loggingmaking it a good choice for ASP.NET Core applications. In this article, you will learn why you should choose Serilog and how to integrate it into your ASP.NET Core project.

ReadOnlySet in .NET 9.NET 9 preview 6 was introduced ReadOnlySet. Here you will learn how it works and why it was added.

.NET: Collection iterated in foreach cannot be modified. Or… The article is devoted to a non-obvious feature that occurs when modifying some collections in .NET. It turns out that for some methods the behavior of .NET Framework and .NET differs.

Troubleshooting 6 Known Issues in .NET MAUI. This article is dedicated to solving six common problems in .NET MAUI.

MemoryCache in C#: A Practical Guide. MemoryCache — is a standard in-memory caching mechanism for applications written in C#. It helps improve system performance and scalability by increasing the amount of memory used. This guide discusses when and how best to use MemoryCache.

News

Extend System.Guid with a new creation API for v7. Discussion about UUIDv7 support in .NET 9. This will bring a number of benefits: improved time sorting, compatibility with other systems and standards, high uniqueness due to random and incremental data, and improved performance when generating and using UUIDs.

Thanks for reading, and we look forward to seeing you again! Don't be shy send Give us your news!

If you would like to share this article with an English-speaking audience, please use the translation link: Artem Rovenskii. .NET Digest #2.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *