when encapsulating field data. Therefore, if you wish to build custom types that integrate well with the .NET plat-
form, avoid defining traditional get and set methods.
In
some cases, it would be useful to specify unique accessibility levels for get and set logic. To
do so, simply prefix an accessibility keyword to the appropriate get or set keyword (the unqualified
scope takes the visibility of the property’s declaration):
Do'stlaringiz bilan baham: