我有一个静态类中的静态变量列表。
namespace Test
{
public static class Numbers
{
public static readonly int One = 1;
public static readonly int Five = 5;
public static readonly int Ten = 10;
public static readonly int Eleven = 11;
public static readonly int Fifteen= 15;
}
}
我想在课堂上随机选择一个变量。我怎样才能做到这一点?
int randomVariable = SomeFunction(Numbers);