Generics let you write data structures and functions with types that are specified later. Functions and types can have type parameters, and instantiated with type arguments, at compile time. Because this occurs at compile time, type parameters — have type constraints. Type constraints restrict the set of allowed type arguments.
How do you change a package that uses strings to generic types? Like many I have packages that work with a single type — but solve a general problem. In this article we look at how convert these to use generics.