SongCollection has no constructor?

Hi there,

Have there been changes to the song collection class in the latest dev build? I replaced my binaries to help with WP 8.1 issues and now I lost the ability to create a song collection object with error stating that it has no constructor defined. Peeking at the definition the class has no public constructor. Are there other classes that construct it for me?

By the definition of XNA, SongCollection should be immutable by design and should have no public constructor.

All of the collections, playlists, and queues returned by methods and properties in the Microsoft.Xna.Framework.Media
namespace are immutable. You cannot add or remove objects from those
collections or playlists. To create a custom ‘playlist’ of songs, games
must maintain their own list of songs to play, and play those songs one
at a time by calling MediaPlayer.Play.
XNA Game Studio 4.0 Refresh | Microsoft Learn

I see that it has a couple of methods that allow modifying, so maybe we shouldn’t stick to XNA on this one. Please create an issue on GitHub:


Thanks for the reply. I was thinking I would have to switch to my own collection. Interestingly a year old book for Win8 dev shows how to use the SongCollection for storing to play. I created an issue as well.