rbwhitaker / CSharpPlayersGuideEarlyAccess

A place to track issues with the C# Player's Guide for patches and future editions
18 stars 0 forks source link

Come up with a better challenge for the generics chapter #675

Closed rbwhitaker closed 1 year ago

rbwhitaker commented 1 year ago

The challenge in the generics chapter is not great. It doesn't really even begin to sell people on the idea of generic types, and it has an issue where the text you're supposed to display may not be correctly displayed if you put the type in a namespace, short of also overriding ToString() on them all. You can definitely do that, but the challenge specifically gives you the types in question.

It's not a great challenge, and it should be replaced with something else that does a better job conveying the benefits of a generic type.

rbwhitaker commented 1 year ago

Got a new challenge in there where you make a class with a value and three items of history, all of generic type T. It's a good improvement over what was there, but I may change it up a bit more later.