Hi Jim,
For me this seems to work, the problem may be that you need to put a L on the end of 0x04…00L,. Also, if you want 64 values you should be able to use ulong as the enum type.
Try this for example:
public enum FlaggedEnum64 : ulong
{
Bit01 = 0x0000_0000_0000_0001L,
Bit02 = 0x0000_0000_0000_0002L,
Bit03 = 0x0000_0000_0000_0004L,
Bit04 = 0x0000_0000_0000_0008L,
Bit05 = 0x0000_0000_0000_0010L,
Bit06 = 0x0000_0000_0000_0020L,
Bit07 = 0x0000_0000_0000_0040L,
Bit08 = 0x0000_0000_0000_0080L,
Bit09 = 0x0000_0000_0000_0100L,
Bit10 = 0x0000_0000_0000_0200L,
Bit11 = 0x0000_0000_0000_0400L,
Bit12 = 0x0000_0000_0000_0800L,
Bit13 = 0x0000_0000_0000_1000L,
Bit14 = 0x0000_0000_0000_2000L,
Bit15 = 0x0000_0000_0000_4000L,
Bit16 = 0x0000_0000_0000_8000L,
Bit17 = 0x0000_0000_0001_0000L,
Bit18 = 0x0000_0000_0002_0000L,
Bit19 = 0x0000_0000_0004_0000L,
Bit20 = 0x0000_0000_0008_0000L,
Bit21 = 0x0000_0000_0010_0000L,
Bit22 = 0x0000_0000_0020_0000L,
Bit23 = 0x0000_0000_0040_0000L,
Bit24 = 0x0000_0000_0080_0000L,
Bit25 = 0x0000_0000_0100_0000L,
Bit26 = 0x0000_0000_0200_0000L,
Bit27 = 0x0000_0000_0400_0000L,
Bit28 = 0x0000_0000_0800_0000L,
Bit29 = 0x0000_0000_1000_0000L,
Bit30 = 0x0000_0000_2000_0000L,
Bit31 = 0x0000_0000_4000_0000L,
Bit32 = 0x0000_0000_8000_0000L,
Bit33 = 0x0000_0001_0000_0000L,
Bit34 = 0x0000_0002_0000_0000L,
Bit35 = 0x0000_0004_0000_0000L,
Bit36 = 0x0000_0008_0000_0000L,
Bit37 = 0x0000_0010_0000_0000L,
Bit38 = 0x0000_0020_0000_0000L,
Bit39 = 0x0000_0040_0000_0000L,
Bit40 = 0x0000_0080_0000_0000L,
Bit41 = 0x0000_0100_0000_0000L,
Bit42 = 0x0000_0200_0000_0000L,
Bit43 = 0x0000_0400_0000_0000L,
Bit44 = 0x0000_0800_0000_0000L,
Bit45 = 0x0000_1000_0000_0000L,
Bit46 = 0x0000_2000_0000_0000L,
Bit47 = 0x0000_4000_0000_0000L,
Bit48 = 0x0000_8000_0000_0000L,
Bit49 = 0x0001_0000_0000_0000L,
Bit50 = 0x0002_0000_0000_0000L,
Bit51 = 0x0004_0000_0000_0000L,
Bit52 = 0x0008_0000_0000_0000L,
Bit53 = 0x0010_0000_0000_0000L,
Bit54 = 0x0020_0000_0000_0000L,
Bit55 = 0x0040_0000_0000_0000L,
Bit56 = 0x0080_0000_0000_0000L,
Bit57 = 0x0100_0000_0000_0000L,
Bit58 = 0x0200_0000_0000_0000L,
Bit59 = 0x0400_0000_0000_0000L,
Bit60 = 0x0800_0000_0000_0000L,
Bit61 = 0x1000_0000_0000_0000L,
Bit62 = 0x2000_0000_0000_0000L,
Bit63 = 0x4000_0000_0000_0000L,
Bit64 = 0x8000_0000_0000_0000L,
}