C# language feature:
-
Getter and setter separate accessibility
applies to
benefit
- Limits accessibility (as desired) to properties (where desired), typically in setting a property.
how to use
- Precede the
set
or get
with a modifier keyword such as protected
example: