binary property

int get binary

Gets the binary representation of the index.

See EnumCollectionBinary.binary for getting the binary representation of multiple enum values. See EnumByBinary.byBinary for converting the binary representation into the enum values.

Implementation

int get binary => index == 0 ? 0 : 1 << (index - 1);