Multiple choice technology programming languages

Property return type can not be void?

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In C# and similar languages, a property getter must return a value (cannot be void) because it needs to provide the property's value when accessed. The setter can be void since it just modifies state. This question specifically addresses the getter's return requirement.