public void AddSong(string name, string artist, int year) { SongInfo song = new SongInfo (name, artist, year); // just for the sake of easyness of appending something we will convert the array to a list List<SongInfo> newSongs = new List<SongInfo>(bestSongs); // add a new element newSongs.Add(song); // and convert it back to an array bestSongs = newSongs.ToArray(); }
public void AddSong(string name, string artist, int year) { SongInfo song = new SongInfo (name, artist, year); bestSongs.Add (song); }