Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Part 5 - Inheritance Example 2
public abstract class StatesPaymentType : PaymentType
{
public new static readonly PaymentType DebitCard = new DebitCardType();
public new static readonly PaymentType CreditCard = new CreditCardType();
public static readonly PaymentType Bitcoin = new BitCoinType();
private class BitCoinType : PaymentType
{
public BitCoinType() : base(3, "Bitcoin")
{
}
public override string Code => "BT";
}
protected StatesPaymentType(int value, string name = null) : base(value, name)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.