You are such a great teacher. Many blessings to you. Simplicity is born out of a deeper understanding. Your tutorials are brilliant, like a breath of fresh air.
Glad you're still with us. Sounds like a crazy experience, that tsunami... Hopefully one day I will learn French or find a translated copy of your book. Interesting to see you coding!
You're my fav C# instructor. Period! I don't know what moment or who sparked the idea in your head that you decided to share your knowledge with the world, I'm just grateful that you did :-)
Tim, great course. I like the way you explain "why" we would use Generics in real-world scenarios as opposed to just giving us "high-level" examples. Note that this teaching method sets you apart from other teachers. Also, you showed us an example where originally we don't use generics and then where (and why) we would use Generics (code reuse and decoupling logic implementation from actual data types).
You're hands down the best teacher I've ever seen. Nothing is left unexplained, everything is always very clear and simple to understand. Thank you so much for inspiring other programmers through your awesome videos!
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 generic
The professor who doesn't assume understanding of some specific part of the explanation makes my understanding much better. Thank you a lot Tim Corey, for providing such a good content and yet free. Thanks from Brazil.
what I iike about your tutorials like this one, is you don't over complicate things and I believe you always consider the level of skill of your watchers, explaining how and why things are done in a certain way. thanks Tim.
I had no problems whatsoever understanding why it was done this way and how generics work, and I forsee it saving me a lot of work in the future. Thanks a lot Tim....
Everyone on here has benefitted from Tim in one way or another. Please subscribe to this man's Patreon, even if it's just the $1, that's nothing compared to the value he provides us for FREE! Support this guy!!!
Nice video as always Tim. Just a note on 35:20 for anyone interested in reflection: You can still grab the properties of a class, using reflection, without creating an instance of that class. This will compile and perform the same task: *var cols = typeof(T).GetProperties();* The instance was still needed in Tim's example though, since he's returning instances of that class in the Load method.
thanks a lot for this excellent and wonderful tutorial about generics. I made some changes on reflection parts and I would share with you guys: public static List LoadFromTextFile(string filePath) where T : class, new() { var lines = System.IO.File.ReadAllLines(filePath).ToList(); List outputList = new List();
var properties = typeof(T).GetProperties();
if (lines.Count < 2) throw new IndexOutOfRangeException("The file was either empty or missing."); // Splits the header into one column header per entry var headerColumns = lines[0].Split(','); lines.RemoveAt(0); foreach (var row in lines) { T entry = new T(); var rowValues = row.Split(','); foreach (var column in headerColumns.Select((columnName, columnIndex) => new { columnName, columnIndex })) { var propertyRef = properties.SingleOrDefault(property => property.Name == column.columnName); if (propertyRef != null) { object typedValue = Convert.ChangeType(rowValues[column.columnIndex], propertyRef.PropertyType); propertyRef.SetValue(entry, typedValue); } } outputList.Add(entry); } return outputList; } public static void SaveToTextFile(List lstData, string filePath) where T : class { List lines = new List(); if (!(lstData?.Count > 0)) throw new ArgumentNullException("data", "You must populate the data parameter with at least one value."); var properties = typeof(T).GetProperties(); lines.Add(string.Join(",", properties.Select(c => c.Name))); foreach (var row in lstData) { var rowValues = properties.Select(c => c.GetValue(row)).ToList(); lines.Add(string.Join(",", rowValues)); } System.IO.File.WriteAllLines(filePath, lines); }
Agree. One of the best teachers that I've found so far. Really clear, in-depth, not going on too fast (like some others just rushing on), so it's easy to follow and grasp. Brilliant! Thanx a lot. :)
Notes that i took: Generics are helpful to for example not create mutliple methods doing the same thing. Imagine having an array of type int, an array of type double and array of type string. If you'd want to print out the contents of these arrays, you would normally have to create three methods with three different parameters to display them. One with an int parameter etc. Instead, you can create a Generic Method. A Generic Method is created by putting " " at the end of the Method name. Then the parameter. Instead of putting a data type as a parameter, you can instead put "T" as a parameter and then call it three times with the different arrays. So instead of having 3 different Methods to call these three different arrays with different data types, you can create one generic method which accepts all data types. You can call your generic whatever you want, it doesnt have to be "T". ------------------------------------------------------ The T in generics specifies which type we are talking about.
Adicted to IAmTimCorey channel. Learning makes easy when we find the right person who can answer our questions without asking them. You are a Great teacher and your efforts are really amazing. Thank you so much Sir. Love from India
Very helpful video. Generics explain in a practical way. Good teaching methodology. Not overcomplicated way of sharing your knowledge. Keep it simple Tim!
I have no idea how anyone could possibly give this video a thumbs down. Thanks Tim! You are awesome. I'll be heading over to Patreon real soon. Appreciate all you do to make our lives easier and wealthier!
Well, thank you Tim for the great content you provide for free to us, the C# developers community. I have an old habit I took when learning C language, a long time ago when I was a student. I always put my checking code at the beginning of my methods, before any declaration or usage of variables and objects. So that I get rid of incorrect or incomplete values before going further, for instance by raising an exception or returning an error code. I don't know if it's a good practice, but I'm sure data is correct after that checking step.
Man been watching and liking all your vids. They are solid. As a person finishing up a year's worth of c# classes, I still find your way of teaching really easy to understand, and the tips and way in which you deliver information is extremely helpful. Many thanks buddy!
wish you could go around the world to teach the teachers how to teach... wow, I feel super happy to have came across your channel. "ke a leboga, thata"(Thank you very much(all the way from RSA))
Thank you for your videos, there are amazing. You help me so much to learn, and your sound and spelling is so clear to make it easy to understand for people that english isnt their native language.
I was busy watching your other Videos, but today was the Time, yay. I've been using a separate class like processor for every model like you said :) where i was doing queries with Dapper and Today was the day when I put them all in one place. I was allways feeling that I'm repeating my self, and I really was! Thank you very much Tim
Fantastic video Tim. What shortcut did you use at 23:46 to rename p to log in just that method? I tried web searching for it and cant find that same menu option you have with "Rename 'p' to 'log'".
You are so good sir, you explain it clearly. Even the topic is pretty advance for me, I can imagine things by your words. Thanks for making this video:)
Thanks! That's actually a pretty common time for me to be recording. I only get a few hours a day where I can record right now (from about 10pm to 2am). I am actually working on some soundproofing and other things so that I can record earlier in the day without degrading the sound quality. Once I get that in place, I can record starting at about 9pm. Once I quit my day job (that is based upon the amount of income I bring in from videos), I can record all day long. That will GREATLY increase the amount of content I can put out. That is also when I'll start being able to put out a video per week in other languages that complement C# like SQL, HTML, CSS, JavaScript, etc. My first priority will be C# but once I have more time, I can support developers more fully in the other areas as well.
Tim ,If that's the route you wanna go, I honestly think you need to put out a lot of your content on Udemy and other sites and make them paid courses. Your explanation is just fantastic and you deserve to get paid for it!
Well, I will be doing more paid courses in the near future (and long-term). I have a few at IAmTimCorey.com but I'll be adding a few more soon. I've looked at Udemy but they really take a lot from teachers (50% plus they set pricing so your $40 course might be sold for $10 without your say). I really don't want to go down that road. I'll stick with my own platform where I can charge a reasonable amount and get about 95% of the asking price. I appreciate the kind words.
IAmTimCorey ah true! See I don't know what their cut is, but yes that's a lot. But you're a real good teacher and would do great doing this full time! Will take some time to get there for sure. Good luck ! :)
Excellent video, Generics have always been a bit confusing to me and it helps me best when there is a practical demo like in this video. So thanks for that
I do have an add-on course to my C# Application from Start to Finish course where I replace the WinForm UI with WPF (using Caliburn Micro and MVVM) if you want to check that out: iamtimcorey.com/courses/tournament-tracker-wpf-user-interface/
Hi Tim, I don't know if this is important, but in my csv-file every line is put into one Excel-cel instead of 3 as it is in your csv-files. Perhaps this is an ignorant question but do you know why this happens?
CSV stands for 'Comma-Separated Values', so do you have a comma between the items you want in separate cells? Just a place to start your investigation.
Your videos are clear and simple and I enjoy watching it. I've tried Pluralsight before and all of the teachers so far (like 4 people) were unnecessarily complicating stuff and were very formal and boring. Thanks a million Tim.
Hey Tim! I am a very big fan of your videos! Thank you for helping me learn C#! I was wondering if you plan to make a follow-up on generics and speak about how we can use generics and dependency inversion together as principles to make dynamic interfaces that we can reuse? I think it is a very interesting and challenging topic that most people would appreciate.
I have always struggled to understand generics and how to use collections and this video just broke it down for me in the simplest way. You are awesome at how you approach topics and i jsut subscribed to you channel so i can learn more
In the load LoadTextFromFile function The that you pass in is a string, but then you say "Where T : class, new()". Wouldn't that "Where" statement require you to pass in something like a Person instance or LogEntry instance rather than a string?
Great video helped a bunch. Wish my teacher would take the time to explain like this instead of using PowerPoint presentations from 10 years ago, while talking for 2 hours yet explaining nothing. xD
Thanks for the feedback. Tim believes in giving context for what he is teaching and that takes time. His goal is not entertainment or just to dump code on you but true education. Very happy you appreciate that!
Great tutorial. You could possibly optimise the code in the SaveToTextFile method by creating another method that loops through the columns and build the line without the trailing comma, as this code is duplicated.
very very awesome , you are so great, yesterday i was creating method to write and read xml files and i couldn't make them generic, know i now why and thanks to you many many thanks
Great video and explanation. I have trouble learning a lot of advanced C# like this though. Even if i understand it i need to use it in practice multiple times to actually make it stick in my head. And when its things like this that has very rare use cases its very hard. You get a long way with the very basics of C#, and that can become a problem.
good video. nice coverage of C# and basic file io as a bonus. generics can be confusing if newly introduced to the concept, but a good explanation overall.
I am doing design patterns. I've already done five (the SOLID principles) and there are more to follow. Here is the playlist with them all in it. I'll update it when I have more: ruclips.net/p/PLLWMQd6PeGY3ob0Ga6vn1czFZfW6e-FLr
Thanks Tim for explaining the concept of Generics in simple terms. You could have also covered the complexity analysis in more detail while discussing the applied reflections. But You did explain it a little bit in terms of time I guess...
I have constant thoughts on how to improve every video. Part of that led me to make this video on balancing that desire for perfection - ruclips.net/video/b5TspWBQkMk/видео.html
You are such a great teacher. Many blessings to you. Simplicity is born out of a deeper understanding. Your tutorials are brilliant, like a breath of fresh air.
Thank you for the kind words.
I agree. Every lesson is very consistent which helps in the learning process.
"Simplicity is born out of a deeper understanding" .........deep
And yes, Tim Corey is the best
Glad you're still with us. Sounds like a crazy experience, that tsunami... Hopefully one day I will learn French or find a translated copy of your book. Interesting to see you coding!
And his voice as well 😍
In India today (5th September) we are celebrating Teachers day. And for me, you are one of the best teachers I came across.
Happy Teachers Day Tim!!
Thank you!
the beauty of this channel is it shows the practical usage of the theoretical concept.
Thanks!
You're my fav C# instructor. Period! I don't know what moment or who sparked the idea in your head that you decided to share your knowledge with the world, I'm just grateful that you did :-)
Tim, great course.
I like the way you explain "why" we would use Generics in real-world scenarios as opposed to just giving us "high-level" examples. Note that this teaching method sets you apart from other teachers.
Also, you showed us an example where originally we don't use generics and then where (and why) we would use Generics (code reuse and decoupling logic implementation from actual data types).
I am glad you found it helpful.
You're hands down the best teacher I've ever seen. Nothing is left unexplained, everything is always very clear and simple to understand. Thank you so much for inspiring other programmers through your awesome videos!
I appreciate the kind words.
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 generic
Thanks! I added it to the description.
Some people are born to teach, you one of them. Big thanks
Thank you!
I haven't come across a better teacher for C# programming online. Thank you so much for what you are doing!
You're very welcome!
I agree
The professor who doesn't assume understanding of some specific part of the explanation makes my understanding much better. Thank you a lot Tim Corey, for providing such a good content and yet free. Thanks from Brazil.
You're very welcome! ... from Texas USA
what I iike about your tutorials like this one, is you don't over complicate things and I believe you always consider the level of skill of your watchers, explaining how and why things are done in a certain way. thanks Tim.
Glad you like them!
Best C# generics tutorial I have come across. Thanks, Tim. Really appreciate it.
You are most welcome. Thanks for watching.
I had no problems whatsoever understanding why it was done this way and how generics work, and I forsee it saving me a lot of work in the future. Thanks a lot Tim....
Everyone on here has benefitted from Tim in one way or another. Please subscribe to this man's Patreon, even if it's just the $1, that's nothing compared to the value he provides us for FREE! Support this guy!!!
I appreciate the kind words and the support.
Or sign up his courses to support him..
Very good teaching, the best part is that first you explain what most of us do and show the best thing. Learnt a lot
Glad to hear that
Nice video as always Tim. Just a note on 35:20 for anyone interested in reflection:
You can still grab the properties of a class, using reflection, without creating an instance of that class. This will compile and perform the same task: *var cols = typeof(T).GetProperties();*
The instance was still needed in Tim's example though, since he's returning instances of that class in the Load method.
Yep, thanks for pointing that out.
thanks a lot for this excellent and wonderful tutorial about generics.
I made some changes on reflection parts and I would share with you guys:
public static List LoadFromTextFile(string filePath) where T : class, new()
{
var lines = System.IO.File.ReadAllLines(filePath).ToList();
List outputList = new List();
var properties = typeof(T).GetProperties();
if (lines.Count < 2)
throw new IndexOutOfRangeException("The file was either empty or missing.");
// Splits the header into one column header per entry
var headerColumns = lines[0].Split(',');
lines.RemoveAt(0);
foreach (var row in lines)
{
T entry = new T();
var rowValues = row.Split(',');
foreach (var column in headerColumns.Select((columnName, columnIndex) => new { columnName, columnIndex }))
{
var propertyRef = properties.SingleOrDefault(property => property.Name == column.columnName);
if (propertyRef != null)
{
object typedValue = Convert.ChangeType(rowValues[column.columnIndex], propertyRef.PropertyType);
propertyRef.SetValue(entry, typedValue);
}
}
outputList.Add(entry);
}
return outputList;
}
public static void SaveToTextFile(List lstData, string filePath) where T : class
{
List lines = new List();
if (!(lstData?.Count > 0))
throw new ArgumentNullException("data", "You must populate the data parameter with at least one value.");
var properties = typeof(T).GetProperties();
lines.Add(string.Join(",", properties.Select(c => c.Name)));
foreach (var row in lstData)
{
var rowValues = properties.Select(c => c.GetValue(row)).ToList();
lines.Add(string.Join(",", rowValues));
}
System.IO.File.WriteAllLines(filePath, lines);
}
Thanks for sharing.
Agree. One of the best teachers that I've found so far. Really clear, in-depth, not going on too fast (like some others just rushing on), so it's easy to follow and grasp. Brilliant! Thanx a lot. :)
You are most welcome. Thanks for watching.
Best Video in Advance Topics Playlist up till now. I loved the generic methods because I faced this problem in my previous organization.
Glad it was helpful!
Best free C# tutorial videos online !
Thank you Sir !
Keep up the good work !
Thank you for the kind words.
Tim, again, an older but very timeless video. Thanks for the clear explanation on generics!
You are welcome.
Good one. Restriction and mentioning empty constructor was new to me. Thank you
Thank you!
That is an excellent and simple explanation. I had some confusion about Generic methods, which are cleared now.
Thank you.
Glad it was helpful!
Notes that i took:
Generics are helpful to for example not create mutliple methods doing the same thing.
Imagine having an array of type int, an array of type double and array of type string.
If you'd want to print out the contents of these arrays, you would normally have to create three methods with three different parameters to display them. One with an int parameter etc.
Instead, you can create a Generic Method.
A Generic Method is created by putting " " at the end of the Method name. Then the parameter.
Instead of putting a data type as a parameter, you can instead put "T" as a parameter and then call it three times with the different arrays.
So instead of having 3 different Methods to call these three different arrays with different data types, you can create one generic method which accepts all data types.
You can call your generic whatever you want, it doesnt have to be "T".
------------------------------------------------------
The T in generics specifies which type we are talking about.
I'm glad you were following along.
Thank you so much sir! That was a very clean explanation and a brilliant example! Now I understood.
Adicted to IAmTimCorey channel. Learning makes easy when we find the right person who can answer our questions without asking them. You are a Great teacher and your efforts are really amazing. Thank you so much Sir. Love from India
Thanks for trusting Tim with your time.
Thank you Tim! This video improved my understanding of the use of generics.
Excellent!
Very helpful video. Generics explain in a practical way. Good teaching methodology. Not overcomplicated way of sharing your knowledge. Keep it simple Tim!
I am glad it was helpful.
I have no idea how anyone could possibly give this video a thumbs down. Thanks Tim! You are awesome. I'll be heading over to Patreon real soon. Appreciate all you do to make our lives easier and wealthier!
I appreciate the kind words.
Tim, 12,114 views and 418 likes and "0" dislikes as on date, That speaks quality of this video. :)
Thank you.
I have been using generics for a quite long time, but never managed to understand how to make one. you explained it very well.
Many thanks Tim Corey
Awesome! I'm glad I could add to your knowledge.
Very clever example and code Tim. Just the right amount of complexity. Liked the reflection thrown in too. Thank you.
You are welcome.
Thanks Tim for giving so much to the community.
You are welcome.
Yes, Generic is useful, it can reduce duplicate code. Thank you very much. Very precise explanation.
You are welcome!
I've been working with .NET, and primarily C#, since before it was even publicly available and I still learn great things from your videos. Thank you!
You are most welcome. Thanks for watching.
Well, thank you Tim for the great content you provide for free to us, the C# developers community. I have an old habit I took when learning C language, a long time ago when I was a student. I always put my checking code at the beginning of my methods, before any declaration or usage of variables and objects. So that I get rid of incorrect or incomplete values before going further, for instance by raising an exception or returning an error code. I don't know if it's a good practice, but I'm sure data is correct after that checking step.
Interesting, thanks for sharing that approach.
Man been watching and liking all your vids. They are solid. As a person finishing up a year's worth of c# classes, I still find your way of teaching really easy to understand, and the tips and way in which you deliver information is extremely helpful. Many thanks buddy!
You are most welcome. Thanks for watching.
wish you could go around the world to teach the teachers how to teach... wow, I feel super happy to have came across your channel. "ke a leboga, thata"(Thank you very much(all the way from RSA))
You are welcome.
This is great. You concisely explained a concept that i originally perceived to be intimidating and confusing. Bravo
I am glad it was helpful.
This is excellent and simple tutorial on C# generics. Thank you for your efforts and sharing your precious knowledge.
I am glad you enjoyed it.
Finaly an example where this is actualy useful. Now I understand the whole thing much better. Thanks a lot!
You are welcome.
Merci bien for your hard efforts to enlighten us Tim! You are an inspiration to start making a good code.
You are welcome.
You are the greatest instructor I have ever seen. You are just awesome.
I appreciate the kind words.
Great work Tim! Your syllable timing is perfect and I can run your video at 1.25 or 1.5 times and it still seems normal to my fast Brain.
Great to hear!
Thank you for your videos, there are amazing. You help me so much to learn, and your sound and spelling is so clear to make it easy to understand for people that english isnt their native language.
I am glad my content has been so helpful.
Here is my “like”, Tim. Thanks for the great lesson.
You are most welcome. Thanks for watching.
This was a very helpful tutorial. Thank you!
You are welcome.
You're my hero Timmy
Such an emotional video, you killed off Sue Storm :)
It was a rough one, but don't forget, Sue is a comic book character. They never really die.
This opened my mind to a lot of things that Ive seen on your other videos but which I did not fully appreciate - until now
Excellent!
I was busy watching your other Videos, but today was the Time, yay.
I've been using a separate class like processor for every model like you said :) where i was doing queries with Dapper and Today was the day when I put them all in one place. I was allways feeling that I'm repeating my self, and I really was!
Thank you very much Tim
I'm glad you were able to figure that out and improve. Well done.
But still a Tutorial with Generics and Dapper will be great :)
I learned generics before. But today I learned why and when I should use it. Thank you !
You are welcome.
Fantastic video Tim. What shortcut did you use at 23:46 to rename p to log in just that method? I tried web searching for it and cant find that same menu option you have with "Rename 'p' to 'log'".
I renamed it manually and then used the Ctrl+. (Quick Actions and Refactoring) to do the rename everywhere.
@@IAmTimCorey Thank you Tim. You're an awesome teacher.
I have to say this is the best generic courses.
Thank you!
@@IAmTimCorey Just let you know I purchased your course today haha
You are so good sir, you explain it clearly. Even the topic is pretty advance for me, I can imagine things by your words. Thanks for making this video:)
You are welcome.
It's really helpful. Sir, only with your video did I learn why, I have to use generic. Thanks a lot.
Great!
Great tutorial, thanks very much for your efforts on these - especially when it's 12:48 AM.. wow dedicated!
Thanks! That's actually a pretty common time for me to be recording. I only get a few hours a day where I can record right now (from about 10pm to 2am). I am actually working on some soundproofing and other things so that I can record earlier in the day without degrading the sound quality. Once I get that in place, I can record starting at about 9pm. Once I quit my day job (that is based upon the amount of income I bring in from videos), I can record all day long. That will GREATLY increase the amount of content I can put out. That is also when I'll start being able to put out a video per week in other languages that complement C# like SQL, HTML, CSS, JavaScript, etc. My first priority will be C# but once I have more time, I can support developers more fully in the other areas as well.
Tim ,If that's the route you wanna go, I honestly think you need to put out a lot of your content on Udemy and other sites and make them paid courses. Your explanation is just fantastic and you deserve to get paid for it!
Well, I will be doing more paid courses in the near future (and long-term). I have a few at IAmTimCorey.com but I'll be adding a few more soon. I've looked at Udemy but they really take a lot from teachers (50% plus they set pricing so your $40 course might be sold for $10 without your say). I really don't want to go down that road. I'll stick with my own platform where I can charge a reasonable amount and get about 95% of the asking price.
I appreciate the kind words.
IAmTimCorey ah true! See I don't know what their cut is, but yes that's a lot. But you're a real good teacher and would do great doing this full time! Will take some time to get there for sure. Good luck ! :)
makes it easier to understand generics than most books or bloggs offer.
That is high praise. Thank you.
Thank you Tim! I work at company where we use C# and MVVM pattern, I learned some new things from you. :)
Excellent!
Excellent video, Generics have always been a bit confusing to me and it helps me best when there is a practical demo like in this video. So thanks for that
You are welcome.
Heh, I needed 6 minutes of Your video to understand what I need.
Truly great content.
Thanks!
Best tutorials on C#! Keep going!
Awesome! Will do.
Really nice. You make C# much easier to understand.
That's the goal. I'm glad it is working.
IAmTimCorey yes, it's working. It will be great if you make a mvvm series. I don't know why I can learn mvvm.
I do have an add-on course to my C# Application from Start to Finish course where I replace the WinForm UI with WPF (using Caliburn Micro and MVVM) if you want to check that out: iamtimcorey.com/courses/tournament-tracker-wpf-user-interface/
I don't know why I didn't see this course before! Thank you Tim!
That you very much. Has really improved my understanding regarding this topic. You are an excellet teacher
Awesome! I'm glad you were able to increase your understanding of the topic.
Hi Tim, I don't know if this is important, but in my csv-file every line is put into one Excel-cel instead of 3 as it is in your csv-files. Perhaps this is an ignorant question but do you know why this happens?
CSV stands for 'Comma-Separated Values', so do you have a comma between the items you want in separate cells? Just a place to start your investigation.
Your videos are clear and simple and I enjoy watching it. I've tried Pluralsight before and all of the teachers so far (like 4 people) were unnecessarily complicating stuff and were very formal and boring. Thanks a million Tim.
I appreciate the kind words.
thanks tim corey for the sharing, hopelly continue share for next videos
We appreciate you making Tim a part of your development journey
Hey Tim! I am a very big fan of your videos! Thank you for helping me learn C#!
I was wondering if you plan to make a follow-up on generics and speak about how we can use generics and dependency inversion together as principles to make dynamic interfaces that we can reuse?
I think it is a very interesting and challenging topic that most people would appreciate.
Added to the list, thanks.
I have always struggled to understand generics and how to use collections and this video just broke it down for me in the simplest way. You are awesome at how you approach topics and i jsut subscribed to you channel so i can learn more
Glad it was helpful! Thanks for the sub!
As always - clear, concise, great. Thank you Tim!
You are welcome.
Wonderful content Tim. Kudos to you!
Thank you!
This is excellent and simple tutorial on C# generics. Thank you for your efforts and sharing your precious knowledge.Thank you sir!!
You are most welcome. Thanks for watching.
In the load LoadTextFromFile function The that you pass in is a string, but then you say "Where T : class, new()". Wouldn't that "Where" statement require you to pass in something like a Person instance or LogEntry instance rather than a string?
Another great video clearly explaining an area that is often misunderstood!
Thank you!
Great explanation, greetings from Argentina
Thank you!
Great video helped a bunch. Wish my teacher would take the time to explain like this instead of using PowerPoint presentations from 10 years ago, while talking for 2 hours yet explaining nothing. xD
Thanks for the feedback. Tim believes in giving context for what he is teaching and that takes time. His goal is not entertainment or just to dump code on you but true education. Very happy you appreciate that!
am impressed, i wanna do more generics with different class properties.
Great!
She glad I found this channel!! Thank you Tim!
We are pleased you did also.
Great tutorial. You could possibly optimise the code in the SaveToTextFile method by creating another method that loops through the columns and build the line without the trailing comma, as this code is duplicated.
very glad i found this video. i've been trying to sort out template interfaces for days!!!
I'm glad you got value out of this video.
Great material, bravo Tim!
Thank you!
Very helpful, using reflection in the code is interesting.
Glad it was helpful!
It was very helpful for me. Thank you Tim.
Glad it was helpful!
very very awesome , you are so great, yesterday i was creating method to write and read xml files and i couldn't make them generic, know i now why and thanks to you
many many thanks
Great!
Your videos are insanely good. Love it.
Thank you!
Bow to the king.
I'm glad you enjoyed it.
Great video, and correct pace
Thanks!
Very helpful, thank you.
You are welcome.
Great lesson, Tim. You've done a great jog teaching us how to handle with C# technology, Thank you so much.
You are welcome.
Good job! I appreciate you posting your videos.
Thanks!
I just whatch your video about interfaces and now generics , We can have a lot fun mixing these two consepts
Yes we can.
Great video and explanation. I have trouble learning a lot of advanced C# like this though. Even if i understand it i need to use it in practice multiple times to actually make it stick in my head. And when its things like this that has very rare use cases its very hard. You get a long way with the very basics of C#, and that can become a problem.
Practice is definitely important. The more you practice it, the more you will grasp it.
good video. nice coverage of C# and basic file io as a bonus. generics can be confusing if newly introduced to the concept, but a good explanation overall.
Thanks for sharing!
Hi, Tim! Do you have any plans on making tuts about design patterns? With your teaching skills this is gonna be the best tutorials on RUclips.
I am doing design patterns. I've already done five (the SOLID principles) and there are more to follow. Here is the playlist with them all in it. I'll update it when I have more: ruclips.net/p/PLLWMQd6PeGY3ob0Ga6vn1czFZfW6e-FLr
Now I love generics. Thanks for the great tutorial.
Excellent!
Tim , you are fabulous trainer.
Keep it up.
I learnt, much more from your video.
Thank you!
You are that perfect c# book I was looking for!
Great!
Thanks Tim for explaining the concept of Generics in simple terms. You could have also covered the complexity analysis in more detail while discussing the applied reflections. But You did explain it a little bit in terms of time I guess...
I have constant thoughts on how to improve every video. Part of that led me to make this video on balancing that desire for perfection - ruclips.net/video/b5TspWBQkMk/видео.html
I appreciate all your efforts Sir. Thank you :)
You are welcome.
This is my 2nd favorite video you've made. :-)
Awesome! What's the first?
Thank you. Very informative. Very well explained.
You are welcome.
Those generics became a problem for me for a time. Thank you for the video.
You are welcome.