CHAPTER 11Parameterized Functionsand Types
A function or type is said to be parameterized when one or more types used in the declaration and definition are left unspecified, so that users of the function can substitute the types of their choice. Parameterized functions are functions that have a type parameter in their argument list (or at least the return type). There are two types of parameterized types in C++/CLI: templates, which are inherited from C++, and generics, which are the CLI parameterized type. This chapter will explore generics in detail, look at some useful collection classes and container types, and then look at managed templates and compare them with generics. It will also discuss when to use generics and when to use managed ...
Get Foundations of C++/CLI: The Visual C++ Language for .NET 3.5 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.