CHAPTER 14

image

Generics

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.

—Douglas Adams

In this chapter, I introduce generics. This feature was introduced in version 2.0 of the .NET Framework and is supported by all of the Microsoft Visual Studio 2013 languages. You will learn how generics can help us solve a variety of problems that arise when we wish to build classes that act on different types of data without sacrificing type safety. In this chapter, we will also begin using a variety of .NET Framework classes to create more interesting and instructive ...

Get C++ 2013 for C# Developers,Second 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.