Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

select random from enum c#

Array values = Enum.GetValues(typeof(Bar));
Random random = new Random();
Bar randomBar = (Bar)values.GetValue(random.Next(values.Length));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #random #enum
ADD COMMENT
Topic
Name
5+2 =