SongCollection.Item Property

Gets the Song at the specified index in the SongCollection.

Namespace: Microsoft.Xna.Framework.Media
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public Song this [
         int index
] { get; }

Property Value

A new Song representing the song at the specified index in this SongCollection.

Each call returns a new Song instance.

Song resources such as the album, artist, and genre are cached in each Song instance. Retrieving and maintaining references to multiple instances of the same song, and then accessing the album, artist, or genre on each of those instances, creates multiple copies of the album, artist, or genre.

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone

Community Additions

ADD
Show: