Beginner
C#
Q70 / 100
What are primary constructors in C# 12?
Correct! Well done.
Incorrect.
The correct answer is B) Constructor parameters declared in the class header, available throughout the class body as captured members
B
Correct Answer
Constructor parameters declared in the class header, available throughout the class body as captured members
Explanation
class Point(int x, int y) { public int X => x; } captures x and y for use in the class body, reducing boilerplate constructor code.
Progress
70/100