DEV Community

Discussion on: Is there a way to make a new enum from an array of `String`s?

 
baenencalin profile image
Calin Baenen

Doesn't making a new class for every command seem bloated?
Otherwise, this does help.

Thread Thread
 
baenencalin profile image
Calin Baenen

Thanks for the help.

Thread Thread
 
baenencalin profile image
Calin Baenen

Is there a way I can convert all the String constants of a class to a String[]?

 
redcreator37 profile image
RedCreator37

Doesn't making a new class for every command seem bloated?
Otherwise, this does help.

It's actually advisable because it makes adding new functionality / commands easier and the code is more readable/easier to maintain. The performance impact is minimal (C# is really good at optimizations).