O'Reilly logo

Visual C#® 2012: How to Program, Fifth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

Section 20.1 Introduction

• Generic methods enable you to specify, with a single method declaration, a set of related methods.

• Generic classes enable you to specify, with a single class declaration, a set of related classes.

• Generic interfaces enable you to specify, with a single interface declaration, a set of related interfaces.

• Generics provide compile-time type safety.

Section 20.2 Motivation for Generic Methods

• Overloaded methods are often used to perform similar operations on different types of data.

• When the compiler encounters a method call, it attempts to locate a method declaration that has the same method name and parameters that match the argument types in the method call.

Section 20.3 Generic-Method Implementation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required