using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Zenelejatszo { class Dal { public string cim, eloado; public string Cim { get { return this.cim; } set { this.cim = value; } } public string Eloado { get { return this.eloado; } set { this.eloado = value; } } public Dal(string cim, string eloado) { Cim = cim; Eloado = eloado; } } class MusicPlayer { public List l = new List(); public void Lejatszas() { foreach (Dal d in l) { Console.WriteLine($"A szám előadója: {d.Eloado}"); Console.WriteLine($"A szám címe: {d.Cim}"); } } } class Program { static void Main(string[] args) { MusicPlayer mp = new MusicPlayer(); Dal song = new Dal("Mindig és soha", "Mikee Mykanic"); Dal song1 = new Dal("Szellemjárás", "Killakikitt"); mp.l.Add(song); mp.l.Add(song1); mp.Lejatszas(); } } }