#region 生成不同隨機數的方法
/// <summary>
/// 生成不同隨機數的方法
/// </summary>
/// <param name="min">最小值</param>
/// <param name="max">最大值</param>
/// <param name="count">取xx個</param>
/// <returns>int數組</returns>
private static int[] GetRandom(int min, int max, int count)
{
int[] maxArray = new int[max];
for (int i = 0; i < max; i++)
{
maxArray[i] = min + i;
}
int[] rArray = new int[count];
Random rd = new Random();
int temp = max;
for (int i = 0; i < count; i++)
{
int tIndex = rd.Next(0, temp);
rArray[i] = maxArray[tIndex];
maxArray[tIndex] = maxArray[--temp];
}
return rArray;
}
#endregion