12.4. Summary

In this chapter you learned how generics can be used to reduce the code burden of developing a new application. We concentrated on how generics enable you to write classes and methods in a way that makes them capable of processing different data types. Not only do generics provide code flexibility, they do it with strongly typed data yet without the hassles involved in having to cast every expression. You also learned how interfaces can be used to simplify your code. Interfaces guarantee the user that specific functionality is provided by the code. Entire books have been written on interfaces and their related topics and they are worth your study.

Get Beginning C# 3.0 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.