Summary

Completed

In this module, you learned about class members and how to create class properties and methods in C#. You examined how to create class properties, which are specialized methods that provide access to fields in a class. You also learned about access modifiers, which control the accessibility of class members to code outside of the class, and methods, which are blocks of code that perform specific tasks.

The main takeaways from this module include understanding how classes control access to the data and behavior of objects. You learned how properties combine aspects of both fields and methods, appearing as a field to the user of an object, while representing one or two code blocks for get and/or set or init accessors to the implementer of a class. You also discovered how access modifiers can be applied to properties and accessors to control their accessibility. Furthermore, you gained insights into methods, including their declaration, invocation, and the use of extension methods to add methods to existing types without modifying the original type.