Table of Contents

Class AlbumCollection

Namespace
Microsoft.Xna.Framework.Media
Assembly
MonoGame.Framework.dll

Represents a collection of albums in the device media library.

public sealed class AlbumCollection : IDisposable
Inheritance
AlbumCollection
Implements
Inherited Members

Remarks

The AlbumCollection class provides access to albums in the device's media library

Use the MediaLibrary.Albums property to obtain a collection of all albums in the media library, the Artist.Albums property to obtain a collection of albums associated with a particular artist, and the Genre.Albums property to obtain a collection of albums associated with a particular genre.

Constructors

AlbumCollection(List<Album>)

Initializes a new instance of the AlbumCollection class, using a specified collection of Album instances.

public AlbumCollection(List<Album> albums)

Parameters

albums List<Album>

The Album collection to initialize this AlbumCollection with.

Fields

Empty

Returns an AlbumCollection with no contents.

public static readonly AlbumCollection Empty

Field Value

AlbumCollection

Properties

Count

Gets the number of Album objects in the AlbumCollection.

public int Count { get; }

Property Value

int

IsDisposed

Gets a value indicating whether the object is disposed.

public bool IsDisposed { get; }

Property Value

bool

this[int]

Gets the Album at the specified index in the AlbumCollection.

public Album this[int index] { get; }

Parameters

index int

Index of the Album to get.

Property Value

Album

A new Album representing the album at the specified index in this AlbumCollection

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()