Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Last active August 7, 2020 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitvijay/92a351ac0c4056858ef844feec7ae6f9 to your computer and use it in GitHub Desktop.
Save ankitvijay/92a351ac0c4056858ef844feec7ae6f9 to your computer and use it in GitHub Desktop.
Part 5 - Inheritance Example 1
public abstract class StatesPaymentType : PaymentType
{
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