In .NET 8, which keyword creates a primary constructor in a record?
-
A
this
-
B
base
-
C
record ( )
Correct answer
-
D
new ( )
Correct answer
C. record ( )
16 views
Explanation
C# 12 (shipped with .NET 8) allows primary constructors directly inside the record header.
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ