I have my enumerator:
[Flags]
public enum EConta {
Receber = 1,
Pagar = 2,
Cobrada = 3,
Atrazada = 4
}
and I have the assignment
EConta conta = EConta.Receber | EConta.Pagar;
var retorno = EConta.Cobrada
How do I compare if the variable conta
has the value of the variable retorno
?
I tested it like this:
conta.HasFlag(retorno)
There is no error, but it does not work
What's wrong?