G
Guest
Hi All,
How do I add native enum values to an ArrayList?
Let's say I have a native enum:
typedef enum _EVENT_CODE
{
A0 = 0,
A1,
A2,
// ......
Z9
} EVENT_CODE, *PEVENT_CODE;
and a value of this type:
EVENT_CODE code = A0;
In order to store an value in ArrayList, I have to convert it to a
System::Object type pointer. Is there a way to do that? I mean, if there is a
way to convert a native enum value to one of any other type, the job will be
done, right?
The last thing I want to do is to write a switch statement; map each of the
enum value to an integer and store the integers in ArrayList instead.
Many thanks!
How do I add native enum values to an ArrayList?
Let's say I have a native enum:
typedef enum _EVENT_CODE
{
A0 = 0,
A1,
A2,
// ......
Z9
} EVENT_CODE, *PEVENT_CODE;
and a value of this type:
EVENT_CODE code = A0;
In order to store an value in ArrayList, I have to convert it to a
System::Object type pointer. Is there a way to do that? I mean, if there is a
way to convert a native enum value to one of any other type, the job will be
done, right?
The last thing I want to do is to write a switch statement; map each of the
enum value to an integer and store the integers in ArrayList instead.
Many thanks!