Microsoft developers have updated .NET Standard to version 2.1, adding to it a number of improvements and a large number of APIs. .NET Standard is a set of common interface specifications for the .NET Framework, .NET Core, Mono, Xamarin, and others. A library that meets the specifications of .NET Standard can be used on other .NET platforms.
- Span data type support for all platforms. Span allows to work with strings, arrays and other types of data, and also introduces an abstraction of access to a certain section of memory for both read and write. This will simplify development. In general, Span is at the heart of most performance improvements in .NET Core 2.1.
- Foundational-API - updated standard for performance. It, unlike Span, expands the list of program interfaces, and not data types.
- Updated ValueTask type for high load scripts. ValueTask returns the result if the operation is performed synchronously without creating a new task, which affects the overall software performance. Using ValueTask allows to minimize the overhead of a PC or server. The type itself appeared in .NET Core 2.1, and in the new version it additionally uses such types as
- Reflection emit adds type generation technology 'on the fly'. Separately, it has already been used, but now it is included in the standard. The .NET ecosystem usually makes extensive use of dynamic functions, so Reflection emit allows to optimize system performance.
- The previously used SIMD API is now included in .NET Standard in the NuGet package.
- There was a primitive DbProviderFactories. It makes it easier for libraries and applications to use ADO.NET technology. The registered instance of DbProviderFactory is selected by name from the database configuration parameters.
System.Stringadded to base class libraries.
In .NET Standard 2.1, it is planned to add about 3 thousand APIs, some of which will be simply updated, while others will be completely new. This solves the problem of sharing code for .NET developers on all platforms. Learn more at official blog.