Skip to content

Clarify C# 9 / C# 10 differences #27664

@CalvinAllen

Description

@CalvinAllen

The article starts out with a call to C# 9, but I found the switch to C# 10 features to be very easy to miss. I made an original assumption that in C# 9, record / record class / record struct, were all introduced at the same time. I also don't see clarification that a record struct is a "value type". Since record is called out in the beginning as a "reference type", I began to assume that a record struct was as well. In between the C# 9 and C# 10 section (mostly at the top, by the way), it's called out that a record uses "value equality" (while also mentioning "reference type" again), but it's never mentioned that a record struct ALSO uses value equality. Maybe some of that assumes underlying knowledge of a struct, since its the same, but I think it would be good to call it out explicitly since record class called it out.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions