Summary

This chapter covered most class members. It showed how constructors initialize an object and it explained why destructors shouldn't be used, even though they're available. Other members include fields, methods, properties, and indexers. With each class member there was a discussion of how XML documentation comments can be applied to those class members.

Methods were covered in-depth. There were explanations about the four kinds of method parameters: value, ref, out, and params. With new language elements like indexers and properties, the role of methods in C# is scaled down as compared to other languages.

There were explanations of the class member modifiers. Accessibility is maintained with the private, protected, internal, and public ...

Get C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.