0

how to create dynamic enum and how to access that enum value directly.

Problem example:

enum Test{
   RED,
   GREEN
}

now i want to add Enum value BLUE dynamically and want to access it like Test.BLUE

kindly suggest solution.

2
  • Please provide an example of what you want to do. This question is not clear. Commented Aug 24, 2017 at 6:15
  • You can't. Take a look at that answer : stackoverflow.com/a/478431/1369579 Commented Aug 24, 2017 at 6:16

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.