Hello everyone,
I have a field which is 1 byte long and is used to store different flags
(according to specs) - it is the flags bit in the ID3 tag header. So
0xabc00000 represents the byte, where only bits a,b and c have any meaning,
the other bits are always 0. I also have the following:
[Flags] enum ID3_Header_Flags {
NoFlag = 0x00000000,
FlagC = 0x00100000,
FlagB = 0x01000000,
FlagA = 0x10000000
};
When I compare the byte with the flag like
if (tagHeader[5] & ID3_Header_Flags.FlagX) where tagHeader is a byte[],
tagHeader[5] is the flags byte, and FlagX represents any of the Flags in the
enum, I get the following error:
"The operator '&' can not be used on Operands of type byte and
test02.Form1.ID3_Header_Flags".
And if I do [Flags] enum ID3_Header_Flags : byte, then the flags are too big
to fit in a byte....
Can you give me any hints what I'm doing wrong and how to solve my problem?
Any help is highly appreciated. Thanks in advance.