Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Created May 19, 2020 21:44
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/0a4a50444a2f2544bab537026fea4864 to your computer and use it in GitHub Desktop.
Save ankitvijay/0a4a50444a2f2544bab537026fea4864 to your computer and use it in GitHub Desktop.
Enumeration Classes - Part 1 - PaymentTypeEnumeration Example
public class PaymentType : Enumeration
{
public static readonly PaymentType DebitCard = new PaymentType(0);
public static readonly PaymentType CreditCard = new PaymentType(1);
private PaymentType(int value, [CallerMemberName] string name = null) : base(value, name)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment