A History of Microsoft .NET, Part 11: Core 5.0

A History of Microsoft .NET, Part 11: .NET Core 5.0

by 

| February 9, 2022 | in

.NET 5 was the unified .NET. It merged .NET Core and .NET Framework, or it kind of did.

From a technology standpoint, .NET 5 supports more of what was missing in .NET Core without question. But .NET 5 was still missing things like a fully functioning WCF. It is hard to make software truly backward compatible — one of the reasons we often don’t recommend the complete rewrite.

Even though .NET 5 wasn’t a true merging of .NET Core and .NET Framework, it doesn’t mean that .NET 5 wasn’t a good release. A lot of unification work did get released with it.

.NET 5 came with many improvements. First was the new record data type. Records are reference types that behave more like a value-type object. This is often what we want for DTOs (Data Transfer Objects) in our systems. This new record type solves a problem we haven’t had a great solution for. We could have used structs, but they never really worked right for DTOs. And classes are fully referenced types, which means they don’t exhibit the copy behavior you would expect when sending a DTO to a service.

Along the lines of a record type was the addition of init property settings. With these settings, a property can only be set while initializing an object. Given the service-oriented programming pattern we employ, this better allows us to have immutable DTOs moving between our layers.

Another big change was top-level statements. We used to have to put all our code inside the main method. This was a fine constraint for production systems, but it created an extra barrier when teaching someone C#.

.NET 5 continues the evolution of .NET. With each version, Microsoft is making it more advanced. I wonder if a more advanced .NET is a better thing; sometimes less is more. Overall, I believe these updates have been a positive change to the language.

Series Overview

Introduction
.NET Framework 2.0 (Generics, Partial Classes, Nullable Types, Anonymous Methods)
.NET Framework 3.0/3.5 (WPF, WF, WCF, Auto-Implemented Properties)
.NET Framework 3.0 (LINQ)
.NET Framework 3.5 SP1 (ADO.NET Entity Framework)
.NET Framework 4.0 (Parallel, Dynamic)
.NET Framework 4.5 (Async)
.NET Core
.NET Core 2.0/2.1
.NET Core 3.0/3.1
.NET Core 5.0

author avatar
Chad Michel Senior Software Architect
Chad is a lifelong Nebraskan. He grew up in rural Nebraska and now lives in Lincoln. Chad and his wife have a son and daughter.

Related posts