public class Student
{
}
public class Roster : List<Student>
{
}
public class Workshop : Roster
{
}
public class Workshop
{
Roster roster = new Roster();
}
I like to create a class that inherits from
List
because it's cleaner when you use it later (and you don't have to remember the type of object the list contains). This:
Roster roster = new Roster()
public Roster GetRoster(){}
is much cleaner than this:
List>Student< roster = new List<Student>()
public List<Student> GetRoster(){}