public enum EnumInvoiceFlags
{
LateFeeApplied = 1,
DelinquencyApplied = 2,
Unfreezed = 4
}
applying masks:
invoice.Flags = invoice.Flags | (int)EnumInvoiceFlags.DelinquencyApplied;
checking if mask has specific value:
if ((invoice.Flags & (int)EnumInvoiceFlags.DelinquencyApplied) != (int)EnumInvoiceFlags.DelinquencyApplied)