Skip to main content
FAQ
- What is the primary purpose of a property?
- To guard access to fields of a class.
- Getting and setting a field value.
- What are Auto-implemented properties?
- Shortcut syntax for defining an implicit baking field with its associated property getter and setter.
- When should you use an auto-implemented property?
- When creating simple properties for a class.
- When shouldn't you use an auto-implemented property?
- If the property requires any code in the getter or the setter.
Comments
Post a Comment