33 lines
812 B
C#
33 lines
812 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Fizetes
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
FizetesMod f1 = new KartyasFizetes("Kártyás Fizetés");
|
|
FizetesMod f2 = new BankiUtalas("Banki utalás");
|
|
FizetesMod f3 = new PayPalFizetes("Fizetés PayPal-al");
|
|
|
|
List<FizetesMod> list = new List<FizetesMod>();
|
|
|
|
list.Add(f1);
|
|
list.Add(f2);
|
|
list.Add(f3);
|
|
|
|
foreach (var item in list)
|
|
{
|
|
if (item is IAnozosithato aobj)
|
|
{
|
|
Console.WriteLine(item);
|
|
}else { Console.WriteLine(item); }
|
|
}
|
|
}
|
|
}
|
|
}
|