Table of Contents

Class PlaylistCollection

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

A collection of playlists in the media library.

public sealed class PlaylistCollection : ICollection<Playlist>, IEnumerable<Playlist>, IEnumerable, IDisposable
Inheritance
PlaylistCollection
Implements
Inherited Members

Constructors

PlaylistCollection()

public PlaylistCollection()

Properties

Count

Gets the number of Playlist objects in the PlaylistCollection.

public int Count { get; }

Property Value

int

IsReadOnly

Gets whether this collection is read-only,

public bool IsReadOnly { get; }

Property Value

bool

this[int]

Gets the Playlist at the specified index in the PlaylistCollection.

public Playlist this[int index] { get; }

Parameters

index int

Property Value

Playlist

Methods

Add(Playlist)

Adds a Playlist to this PlaylistCollection.

public void Add(Playlist item)

Parameters

item Playlist

Clear()

Removes all items from this PlaylistCollection.

public void Clear()

Clone()

public PlaylistCollection Clone()

Returns

PlaylistCollection

Contains(Playlist)

Determines whether the collection contains specified Playlist

public bool Contains(Playlist item)

Parameters

item Playlist

Returns

bool

CopyTo(Playlist[], int)

Copies the elements of the collection to an Array, starting at a particular Array index.

public void CopyTo(Playlist[] array, int arrayIndex)

Parameters

array Playlist[]

The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Dispose()

public void Dispose()

GetEnumerator()

public IEnumerator<Playlist> GetEnumerator()

Returns

IEnumerator<Playlist>

IndexOf(Playlist)

Searches for the specified Playlist and returns the zero-based index of the first occurence within the entire PlaylistCollection.

public int IndexOf(Playlist item)

Parameters

item Playlist

The Playlist to locate

Returns

int

The zero-based index of the first occurence of item within the entire PlaylistCollection, if found. otherwise, -1.

Remove(Playlist)

Removes the first occurrence of a Playlist from the PlaylistCollection.

public bool Remove(Playlist item)

Parameters

item Playlist

The object to remove from the PlaylistCollection.

Returns

bool

true if item was successfully removed from the PlaylistCollection; otherwise, false. This method also returns false if item is not found in the original PlaylistCollection.