
Explore generics in .NET, covering generic methods, classes, interfaces, delegates, and inheritance with generics, plus constraints, framework types, real-world transformations from non-generic to generic code, and a linked list example.
Explore building a non-generic linked list in .NET, using node objects with data and next pointers, head management, and insert-at-head and index-get operations, plus tests verifying count and retrieval.
Explore type constraints in generics, enforcing T to derive from Person or implement the name interface, with relationship constraints and tests using Person and Employee to list names.
Understand the .NET generics new constraint, which requires a parameterless constructor for T, enabling safe new T creation and highlighting abstract class restrictions and factory alternatives.
Explore VB.NET generic constraint syntax, including class and interface constraints and the new constraint, and note differences from C#, with practical VB examples in the VB solution files.
Explore how generics replace reflection in modal dialog initialization by using a strongly typed arguments class and a generic show method. This enforces the initialize contract and prevents runtime errors.
Explore generics in .NET by comparing built-in enums with class based enumerations, showing constraints, parsing strings to enums, and using reflection for a safe, extensible enumeration pattern.
Learn covariance and contravariance in the dot net framework, including arrays, interfaces, and delegates, with the out keyword enabling covariance for reference types only.
Explore reflection in generics by inspecting generic types, open and closed forms, and constructing types with make generic type and activator to invoke generic methods.
In this Generics in .NET training course, expert author Joe Wirtley will teach you how to use generics in .NET to eliminate code duplication and enforce static typing. This course is designed for users that already have a basic working knowledge of C#.
You will start by learning the generic basics, including generic methods, classes, and interfaces. From there, Joe will teach you about generics in the framework, generics and arrays, and delegate types. This video tutorial will also cover constraints and real world examples, such as XML serialization and modal dialog initialization. Finally, you will learn about some other topics including generics and enumerations, generic terminology, and covariance.
Once you have completed this computer based training course, you will have learned the necessary concepts required for using generics in .NET.