Advertisement
pszczyg

EnumSpeed_03

Sep 14th, 2021 (edited)
1,418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. public static class InvoicePaymentMethodExtensions {
  2. public static bool IsUndefined(this InvoicePaymentMethods paymentMethod) {        
  3.         if (paymentMethod == InvoicePaymentMethod.Undefined){
  4.                 return true;
  5.             }
  6.  
  7.             var isDefined = Enum.IsDefined(typeof(InvoicePaymentMethod), paymentMethod);
  8.             return !isDefined;
  9.     }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement