AThey can be assigned anywhere in the class after construction.
BThey prevent the property from being read.
CThey behave exactly like traditional setters.
DThey can only be assigned in the constructor or object initializer.
Step-by-Step Solution
Solution:
Step 1: Recall init-only setter assignment rules
Init-only setters allow assignment only during construction or object initialization.
Step 2: Evaluate each option
They can only be assigned in the constructor or object initializer. matches the rule; A and C are false because they allow later assignment; D is false because properties remain readable.
Final Answer:
They can only be assigned in the constructor or object initializer. -> Option D
Quick Check:
Init-only assignment = constructor or initializer only [OK]
Quick Trick:Init-only = assign once during creation, not later [OK]
Common Mistakes:
MISTAKES
Assuming init-only setters allow changes anytime
Confusing init-only with readonly properties
Thinking init-only disables reading property
Master "Properties and Encapsulation" in C Sharp (C#)
9 interactive learning modes - each teaches the same concept differently