public static int[] RandomNumbers(int n,int min,int max)
{
Random rnum = new Random();
HashSet<int> hset = new HashSet<int>();
while (hset.Count < n)
hset.Add(rnum.Next(min,max));
int[] OutPut = hset.ToArray();
return OutPut;
}
public static int[] RandomNumbers(int n,int min,int max)
{
Random rnum = new Random();
HashSet<int> hset = new HashSet<int>();
while (hset.Count < n)
hset.Add(rnum.Next(min,max));
int[] OutPut = hset.ToArray();
return OutPut;
}
آخرین ویرایش به وسیله Mahmoud.Afrad : یک شنبه 20 خرداد 1397 در 09:03 صبح