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
Constructors
PlaylistCollection()
public PlaylistCollection()
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
indexint
Property Value
Methods
Add(Playlist)
Adds a Playlist to this PlaylistCollection.
public void Add(Playlist item)
Parameters
itemPlaylist
Clear()
Removes all items from this PlaylistCollection.
public void Clear()
Clone()
public PlaylistCollection Clone()
Returns
Contains(Playlist)
Determines whether the collection contains specified Playlist
public bool Contains(Playlist item)
Parameters
itemPlaylist
Returns
CopyTo(Playlist[], int)
public void CopyTo(Playlist[] array, int arrayIndex)
Parameters
arrayPlaylist[]The one-dimensional Array that is the destination of the elements copied from collection. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.
Dispose()
public void Dispose()
GetEnumerator()
public IEnumerator<Playlist> GetEnumerator()
Returns
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
itemwithin 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
itemPlaylistThe 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.