.NET|从指定的数组中,随机抽取一个数

int[] arrViewCount = new int[] { 1, 3, 5, 7, 9, 2, 4, 6, 8 }; Random r = new Random(); int n = r.Next(0, arrViewCount.Length - 1); Response.Write(arrViewCount[n].ToString());


    推荐阅读