3
I have my enumerator:
[Flags]
public enum EConta {
Receber = 1,
Pagar = 2,
Cobrada = 3,
Atrazada = 4
}
and have the assignment
EConta conta = EConta.Receber | EConta.Pagar;
var retorno = EConta.Cobrada
How do I compare if in variable conta
has the variable value retorno
?
I tested it like this:
conta.HasFlag(retorno)
No error happens, but it doesn’t work
What’s wrong with it ?
thanks for the answer, and if I need to have another value on Enum, the value will be 16 ? that ?
– Rod
Yes 16, 32, 64 etc, .
– ramaral