Here is a simple example. The List collection can contain any kind of object. Declare it as a list of a specific object using the <object name> syntax, as shown below.
using System.Collections.Generic;
class Artist { ... }
class ArtistCollection
{
List <Artist> data = null;
public ArtistCollection ()
{
data = new List<Artist>();
}
public void Add (Artist a)
{
data.Add (a);
}
}
Brandon
|