B
Bob
I'm porting a piece of C++ code to C#. It looks something like this:
#define MAKE_ENUM(x, y, z) (((x) << 16) | ((y) << 8)) | (z))
enum MyEnum
{
A = MAKE_ENUM(3, 9, 0),
B = MAKE_ENUM(4, 10, 1),
C = MAKE_ENUM(5, 11, 2),
};
You get the idea. Now can I do this sort of thing in C#? I haven't had much luck
making the macro into a function for obvious reasons.
#define MAKE_ENUM(x, y, z) (((x) << 16) | ((y) << 8)) | (z))
enum MyEnum
{
A = MAKE_ENUM(3, 9, 0),
B = MAKE_ENUM(4, 10, 1),
C = MAKE_ENUM(5, 11, 2),
};
You get the idea. Now can I do this sort of thing in C#? I haven't had much luck
making the macro into a function for obvious reasons.