Readings 401
Collections
- Collections and arrays are two ways of managing groups of related objects in C#.
- Collections are more flexible than arrays, they are dynamic.
- A collection is a class.
- System.Collections.Generic namespace can be used if a collection has only one data type.
Enums
- An enum is the keyword for ‘enumeration type’. It is a value type.
- An enum provides a set of mutually distinct values. the four seasons, or t-shirt sizes, or colors.
- An enum can be coded the following way in C#
enum Season
{
Spring,
Summer,
Autumn,
Winter
}