Chapter 8. Methods

In this chapter:

Instance Constructors and Classes (Reference Types)

Instance Constructors and Structures (Value Types)

Type Constructors

Operator Overload Methods

Conversion Operator Methods

Extension Methods

Partial Methods

This chapter focuses on the various kinds of methods that you’ll run into, including instance constructors and type constructors, as well as how to define methods to overload operators and type conversions (for implicit and explicit casting). We’ll also talk about extension methods, which allow you to logically add your own instance methods to already existing types, and partial methods, which allow you to spread a type’s implementation into multiple parts.

Instance Constructors and Classes (Reference Types)

Constructors ...

Get CLR via C#, Fourth Edition 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.