Intermediate C#
Q44 / 100

What is a record type in C# (C# 9+)?

Correct! Well done.

Incorrect.

The correct answer is B) An immutable reference type with value-based equality and auto-generated toString, equals, and with-expression support

B

Correct Answer

An immutable reference type with value-based equality and auto-generated toString, equals, and with-expression support

Explanation

record Person(string Name, int Age); auto-generates equality, deconstruction, and with-expressions: var older = person with { Age = 30 };.

Progress
44/100