-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibrary.cs
More file actions
40 lines (34 loc) · 844 Bytes
/
Library.cs
File metadata and controls
40 lines (34 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MusicPlayerApp
{
public class Library
{
public List<Song> Songs { get; set; }
public List<Playlist> Playlists { get; set; }
public Library(List<Song> songs, List<Playlist> playlists)
{
Songs = songs;
Playlists = playlists;
}
public void AddSong(Song song)
{
Songs.Add(song);
}
public void RemoveSong(Song song)
{
Songs.Remove(song);
}
public void AddPlaylist(Playlist playlist)
{
Playlists.Add(playlist);
}
public void RemovePlaylist(Playlist playlist)
{
Playlists.Remove(playlist);
}
}
}