Class PlaylistCollection
A collection of playlists in the media library.
public sealed class PlaylistCollection : ICollection<Playlist>, IEnumerable<Playlist>, IEnumerable, IDisposable
- Inheritance
-
PlaylistCollection
- Implements
- Inherited Members
Properties
Count
Gets the number of Playlist objects in the PlaylistCollection.
public int Count { get; }
Property Value
IsReadOnly
Gets whether this collection is read-only,
public bool IsReadOnly { get; }
Property Value
this[int]
Gets the Playlist at the specified index in the PlaylistCollection.
public Playlist this[int index] { get; }
Parameters
index
int
Property Value
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()
Creates a new object that is a copy of the current instance.
public PlaylistCollection Clone()
Returns
- PlaylistCollection
A new object that is a copy of this instance.
Contains(Playlist)
Determines whether the collection contains specified Playlist
public bool Contains(Playlist item)
Parameters
item
Playlist
Returns
CopyTo(Playlist[], int)
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
intThe zero-based index in array at which copying begins.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<Playlist> GetEnumerator()
Returns
- IEnumerator<Playlist>
An enumerator that can be used to iterate through the collection.
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
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
PlaylistThe 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.