Microsoft has released C# 9 with .NET 5.0. It has lots of new features. One feature I am particularly excited about is new Record Type in C# 9. We can now define our data classes with less code, and it looks clean.
It also provides synthesized methods to provide value semantics for equality. Which makes unit test verification lot easier. Without the Record Type, if we use Class to define entity and when a new instance is created in a service under test to pass it to another class’s method, then we need to use It.Is<T>(...)
…
Developer, Blogger, Mathematician having 15+ years of experience in Software development and delivery using C#, ASP.NET, WebAPI, Angular etc.