Pluralsight: Generics in VB.NET

Published on

Generics in VB.NET

This course introduces you to Generics in Visual Basic.NET. It starts with a discussion of what Generics are and why they were added to VB.NET and the .NET Framework. We then move to a demo heavy part of the course, looking at how to consume the Generic types included in .NET and how to create your own custom Generic classes and interfaces. The demos start out as simple and gradually get more complex as we get farther into the course. We finish with a discussion of Generic Covariance and Contravariance, names that make the topics seem much more complex than they really are.

Course Contents:

  1. Why Generics?
    • Introduction
    • Issues with Weakly-typed Collections
    • Custom Collection Classes – A Possible Solution?
    • Course Agenda
  2. Working with the Built-in .NET Generic Types
    • Working with the List Class
    • Working with the Dictionary Class
    • Generic Collection Classes
    • Generic Interfaces
    • Generic Delegates
  3. Implementing Generic Methods and Interfaces
    • Implementing Generic Interfaces
    • Building Custom Generic Methods
    • Generic Type Constraints
  4. Defining Generic Types
    • Introduction
    • Adding the Interfaces
    • Adding the Repository Class
    • Implementing Commit
    • Implementing LoadXml
  5. Generic Type Conversions
    • Introduction
    • Type Conversions Pre-.NET 4,0
    • Type Conversions Post-.NET 4.0
    • Covariance
    • Implementing Covariance
    • Contravariance
    • Conclusion