18. Generics

Objectives

In this chapter you’ll:

Image Create generic methods that perform identical tasks on arguments of different types.

Image Create a generic Stack class that can be used to store objects of a specific type.

Image Understand how to overload generic methods with nongeneric methods or with other generic methods.

Image Understand the kinds of constraints ...

Get C# 6 for Programmers, Sixth 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.