public static TrackStore GetTrackStore() { TrackStore result = new TrackStore(); string[] artists = new string[] { "Bear Bearison", "Bearaello", "Berrero Rocher" }; string[] titles = new string[] { "My Way", "Your Way", "His Way", "Her Way" }; Random rnd = new Random(); foreach (string artist in artists) { result.AddRange(from string title in titles let track = new MusicTrack { Artist = artist, Title = titles[rnd.Next(0, artists.Length - 1)] } select track); } return(result); }
public void CustomCollectionWithList() => TrackStore.GetTrackStore().RemoveArtist("Bear Bearison");