日期:2014-05-17 浏览次数:20967 次
private void btnCreateNumber_Click(object sender, EventArgs e)
{
int[] sorttemp = new int[20];
for (int i = 0; i < 20; i++)
{
sorttemp[i] = CheckNumberRepeat(sorttemp);
}
}
private int CheckNumberRepeat(int[] iImport)
{
Random NumRandom = new Random();
int iTempRedNum = NumRandom.Next(1, 34);
for (int i = 0; i < iImport.Length; i++)
{
if (iImport[i] == iTempRedNum)
{
CheckNumberRepeat(iImport);
}
}
return iTempRedNum;
}