Thumbnail for video: Record vs Class in C# (Zero to Pro)

Record vs Class in C# (Zero to Pro)

Published on:July 30, 2026Duration:2:43Views:44 viewsLikes:2 likesComments:0 comments

C# 9 added a new keyword — record — and at first glance it looks like a class with less typing. But the difference isn't syntax, it's what equality even means. This video breaks down reference equality vs. value equality, why records are built around immutability with init-only properties and with-expressions, the Equals/GetHashCode/ToString/Deconstruct members the compiler generates for you on a record, when to reach for a record versus a class, and the inheritance gotcha that catches people once they start relying on record equality. TIMESTAMPS 0:00 Intro — Record vs Class in C# 0:52 Reference Equality vs Value Equality 1:53 Immutability By Default — Init-Only & With-Expressions 2:22 Four Members, Generated For Free