Is it possible to assign (explicitly) access specifiers for get and set accessors in a property?
Yes, but with some restriction.
Yes ,but with some restriction.
If the property is declared public, then by default the get and set accessors access specifier will be public. We can not explicitly assign or change both accessors access specifier at a time. Either access specifier of getter or access specifier of setter can be explicitly assigned at a time.
Back To Top