Explain Get and Set Accessor properties C# ?
- Get and Set are called Accessors. These are made use by Properties. A property provides a mechanism to read, write the value of a private field. For accessing that private field, these accessors are used.
- Get Property is used to return the value of a property
- Set Property accessor is used to set the value.
The usage of get and set is as below:
No comments