C# Generics - What they are, why they are useful, and how to create them
IAmTimCorey IAmTimCorey
412K subscribers
252,884 views
0

 Published On May 7, 2018

Have you ever used a List of T and wondered what the T meant? Or maybe you heard the term generics but you did not really know what that was or why it was important. Maybe you have been using generics for a while but didn't know you could create your own. Whatever the case, this video is for you. In this video, I am going to lay the foundation of what generics are and what makes them so powerful. Then, we will look at a demonstration I have set up on how you can keep your code dry, better conform to the SOLID principles, and make your life easier by implementing generics a class.

Source Code: https://leadmagnets.app/?Resource=CSh...
Patreon:   / iamtimcorey  
Newsletter signup: https://signup.iamtimcorey.com/

0:00 - Intro
1:33 - Creating a List of T
4:03 - Why not to use ArrayList and why generics are useful
11:10 - Demo app walk through pt1
22:56 - The problem: repetition
28:55 - Solving the repetition with generics; Demo application walk through pt2
47:50 - When to use generics
50:41 - Passing in more than one type of generic

show more

Share/Embed