public static T NextValue<T>() where T : Enum { return (T)(object)Rand.Next(0, Enum.GetValues(typeof(T)).Length - 1); }