Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
C/C++ Languages
Generics

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual C++ Language Reference
Generics (Visual C++)

Visual C++ 2005 introduces support for generic methods and types in Visual C++. In this section, find out how to author your own generic methods and types in Visual C++ and how to use generic types authored in C# or another language in Visual C++. This section also includes a comparison of generics and C++ templates.

In This Section

Overview of Generics in Visual C++

Information about generics are, the motivation for the language feature, definitions of terms used to describe generics, and information about the use of reference types and value types as type parameters for generics.

Generic Functions

Information about defining and using generic functions and methods.

Generic Classes (Visual C++)

Information about defining and using generic classes.

Generic Interfaces (Visual C++)

Information about defining and using generic interfaces.

Generic Delegates (Visual C++)

Information about defining and using generic delegates.

Constraints

Information about using constraints in generic types.

Consuming Generics from Other .NET Languages

Information about using generics defined in .NET assemblies, possibly authored in other languages, in Visual C++.

Generics and Templates

A comparison of generics and templates, when to use each, and how to combine them usefully.

Related Sections

How to: Iterate Over a Generic Collection with for each

Using the for each, in keyword on a generic collection.

Generics in the .NET Framework Class Library (C# Programming Guide)

Discusses .NET Framework class library's System.Collections.Generic, namespace, which includes several ready-to-use generic collection classes and associated interfaces.

Introduction to Generics (C# Programming Guide)

The generics section in the C# documentation.

Generics in J#

The generics section in the J# documentation.

Generic Types in Visual Basic

The generics section in the Visual Basic documentation.

Templates Overview

Information on templates in C++.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker