using System.Collections.Generic;
public abstract class CustomerBase
public CustomerBase(string name)
public abstract string Type { get; }
public string Name { get; }
public class GoldCustomer : CustomerBase
public GoldCustomer(string name)
public override string Type => "Gold";
public class SilverCustomer : CustomerBase
public SilverCustomer(string name)
public override string Type => "Silver";
public static void Main()
var customers = new List<CustomerBase> {
new GoldCustomer("Frank"),
new SilverCustomer("Jack")
foreach (CustomerBase c in customers) {
Console.WriteLine($"{c.Name} is {c.Type}");