.NET Framework includes a large class library named as Framework Class Library and provides language interoperability across several programming languages.

.NET is a free, cross-platform, open source developer platform for building many different types of applications. .NET Framework is the original implementation of .NET. It supports running websites, services, desktop apps, and more on Windows.

With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, gaming, and IoT.

You can write .NET apps in C#, F#, or Visual Basic.

  • C# is a simple, modern, object-oriented, and type-safe programming language.
  • F# is a cross-platform, open-source, functional programming language for .NET. It also includes object-oriented and imperative programming.
  • Visual Basic is an approachable language with a simple syntax for building type-safe, object-oriented apps.

Runtime

The runtime includes everything you need to run existing apps/programs built with .NET Framework.

Developer Pack

The developer pack is used by software developers to create applications that run on .NET Framework, typically using Visual Studio.

What’s New

.NET 7 is the successor to .NET 6 and focuses on being unified, modern, simple, and fast. .NET 7 will be supported for 18 months as a standard-term support (STS) release (previously known as a current release).

This article lists the new features of .NET 7 and provides links to more detailed information on each.

To find all the .NET articles that have been updated for .NET 7, see .NET docs: What’s new for the .NET 7 release.

Performance

Performance is a key focus of .NET 7, and all of its features are designed with performance in mind. In addition, .NET 7 includes the following enhancements aimed purely at performance:

  • On-stack replacement (OSR) is a complement to tiered compilation. It allows the runtime to change the code executed by a currently running method in the middle of its execution (that is, while it’s “on stack”). Long-running methods can switch to more optimized versions mid-execution.
  • Profile-guided optimization (PGO) now works with OSR and is easier to enable (by adding true to your project file). PGO can also instrument and optimize additional things, such as delegates.
  • Improved code generation for Arm64.
  • Native AOT produces a standalone executable in the target platform’s file format with no external dependencies. It’s entirely native, with no IL or JIT, and provides fast startup time and a small, self-contained deployment. In .NET 7, Native AOT focuses on console apps and requires apps to be trimmed.
  • Performance improvements to the Mono runtime, which powers Blazor WebAssembly, Android, and iOS apps.

For a detailed look at many of the performance-focused features that make .NET 7 so fast, see the Performance improvements in .NET 7 blog post.

System.Text.Json serialization

.NET 7 includes improvements to System.Text.Json serialization in the following areas:

  • Contract customization gives you more control over how types are serialized and deserialized. For more information, see Customize a JSON contract.
  • Polymorphic serialization for user-defined type hierarchies. For more information, see Serialize properties of derived classes.
  • Support for required members, which are properties that must be present in the JSON payload for deserialization to succeed. For more information, see Required properties.

For information about these and other updates, see the What’s new in System.Text.Json in .NET 7 blog post.

Generic math

  • .NET 7 and C# 11 include innovations that allow you to perform mathematical operations generically – that is, without having to know the exact type you’re working with. For example, if you wanted to write a method that adds two numbers, previously you had to add an overload of the method for each type. Now you can write a single, generic method, where the type parameter is constrained to be a number-like type. For more information, see the Generic math article and the Generic math blog post.

Regular expressions

.NET’s regular expression library has seen significant functional and performance improvements in .NET 7:

  • The new option RegexOptions.NonBacktracking enables matching using an approach that avoids backtracking and guarantees linear-time processing in the length of the input. The nonbacktracking engine can’t be used in a right-to-left search and has a few other restrictions, but is fast for all regular expressions and inputs.
  • Regular expression source generators are new. Source generators build an engine that’s optimized for your pattern at compile time, providing throughput performance benefits. The source that’s emitted is part of your project, so you can view and debug it. In addition, a new source-generator diagnostic SYSLIB1045 alerts you to places you use Regex that could be converted to the source generator. For more information, see .NET regular expression source generators.
  • For case-insensitive searches, .NET 7 includes large performance gains. The gains come because specifying RegexOptions.IgnoreCase no longer calls ToLower on each character in the pattern and on each character in the input. Instead, all casing-related work is done when the Regex is constructed.
  • Regex now supports spans for some APIs. The following new methods have been added as part of this support:
  • Regex.EnumerateMatches
  • Regex.Count
  • Regex.IsMatch(ReadOnlySpan) (and a few other overloads)

For more information about these and other improvements, see the Regular expression improvements in .NET 7 blog post.

Complete release notes can be found here.

Source link