Introduction to .Net 7Sachin Kalaskar
Happy New Year!! everyone.
Let’s begin the 1st technical series of 2023 with something new recently announced by Microsoft, “.Net 7”. This post will cover some important New Features In .Net 7 and will continue with more in upcoming posts.
1. Default Pooling for Threads :
Windows now use the managed thread pool implementation by default. This can be more efficient as it helps distribute IO requests in batches to fewer threads.
2. Micro & Nanoseconds for DateTime :
The TimeSpan, Time-Only, DateTime, and DateTimeOffset classes can now be used with microseconds and nanoseconds.
3. New APIs for Tar Archives :
A new feature in .NET 7 is the support for tar archives.
The framework now brings a new assembly, “System.Formats.Tar.”This cross-platform API allows you to read, write, archive, and extract tar archives.
4. New Type Converters :
.NET 7 brings new primitive types that can be converted using new type converters. In addition to adding new APIs to System.Text.Json, JsonWriterOptions.MaxDepth
has been added as well. JsonSerializerOptions.Default allows access to the default JsonSerializerOptions, while System.Text.Json now supports poly-morphism when serializing and de-serializing type hierarchies.