Partilhar via


SongCollection.Item Property

Gets the Song at the specified index in the SongCollection.

Syntax

'Declaration
Public ReadOnly Property Item ( _
         index As Integer _
) As Song 
public Song this [
         int index
] { get; }
public:
property Song default [Int32] {
         Song get (int index);
}

Property Value

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

Remarks

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.

Requirements

Namespace: Microsoft.Xna.Framework.Media

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

See Also

Reference

SongCollection Class
SongCollection Members
Microsoft.Xna.Framework.Media Namespace

Platforms

Windows Phone