CHAPTER 11 ADVANCED C# LANGUAGE FEATURES
Summary
The purpose of this chapter was to deepen your understanding of the C# programming language. First,
you investigated various advanced type construction techniques (indexer methods, overloaded
operators, and custom conversion routines).
Next, you examined the role of extension methods and anonymous types. As you’ll see in some
detail in the next chapter, these features are very useful when working with LINQ-centric APIs (though
you can use them anywhere in your code, should they be useful). Recall that anonymous methods allow
you to quickly model the “shape” of a type, while extension methods allow you to tack on new
functionality to types, without the need to subclass.
You spent the remainder of this chapter examining a small set of lesser-known keywords (sizeof,
unsafe, and so forth), and during the process learned how to work with raw pointer types. As stated
throughout our examination of pointer types, the vast majority of your C# applications will never need to
make use of them.
438