DEV Community

Cover image for What Is Record Type In C#
Mohammad Negah
Mohammad Negah

Posted on

What Is Record Type In C#

A Record is a special reference type that was introduced in C# 9, designed to make it easier to create immutable data objects. Think of it like a class but with a lot less hassle when it comes to defining equality, immutability, and encapsulation. The key point here is that Records are best suited for scenarios where you want to model data with minimal code and need built-in features like value equality instead of reference equality.

What Is Record Type In CSharp

Top comments (0)