Generics

Watch the first few minutes on us! If you'd like to watch the entire video and hundreds more like it, download code samples, access offline videos and skills assessments, and use the discussion forums, log in or purchase a subscription.


Instructor

Jeffrey Richter

Description

Like inheritance, generics offer another form of code re-use. Specifically, one developer can define an algorithm (such as sort or search) and another developer can consume that algorithm specifying the exact data type (such as String or Guid) that the algorithm should use. This video explains how generics in the Common Language Runtime (CLR) work and what kinds of types and members can be generic. We also look at the performance and memory overhead when using generic algorithms. The video concludes by discussing the importance of type safety and how generic constraints are required to maintain it.

Table of Contents

{{toc.Position}} {{toc.Text}}

Related Links

  • {{link.LinkText}} (requires a paid subscription)

Series

This course is part of the following series: