Tracks
/
C#
C#
/
Syllabus
/
Generic Types
Ge

Generic Types in C#

9 exercises

About Generic Types

Lists are an example of generic classes. You will also see HashSet<T> and Dictionary<T> in early exercises.

If you need a list of different types then you can use List<Object> but you will need to down cast elements that you access in from the list.

You should also be aware of System.Collections.List which you may encounter in legacy code. To all intents and purposes this behaves like List<Object>.

Edit via GitHub The link opens in a new window or tab

Learn Generic Types

Practicing is locked

Unlock 4 more exercises to practice Generic Types