2024-01-19 14:06:27 +00:00
|
|
|
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<Dal> l = new List<Dal>();
|
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|