C Sharp Enum

From Leo's Notes
Last edited on 24 February 2017, at 19:14.

Random Enum Value

Create a new Random object to use on the code below.

Array values = Enum.GetValues(typeof(HallEvents));
return  (HallEvents) values.GetValue(this.Random.Next(values.Length));