0

Add enum value in runtime?

Ex: enum Weapons {Knife, Gun, Grenade}; Then, i want to add Bazooka to it, so that Weapons.Bazooka is valid. Is it possible?

26th Dec 2021, 12:52 AM
Early
Early - avatar
2 Answers
+ 2
Just add it to the enum if you know you want to use Bazooka.
26th Dec 2021, 2:06 AM
Brian
Brian - avatar