Introducing Generics

Generic types are .NET types that can adapt their behavior to different types of objects without the need of defining a separate version of the type. In other words, you can implement a generic type to work with integers, strings, custom reference types, and any other .NET type with a single implementation. Generics offer several advantages:

Image Strongly typed programming techniques—Generic objects can hold only the specified type and avoid accidents of handling objects of different types within the same group.

Image Better performances— ...

Get Visual Basic 2015 Unleashed 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.