I want to take 50 numbers at random so that there must be no repetition in them using random method.
Below is my code so far:
private void settext()
{
int i;
Queue <int> qe= new Queue<int>(50);
Random rm= new Random();
for (int g = 0; g < 50; g++)
{
i = rm.Next(1, 50);
if (!qe.Contains(i))
{
qe.Enqueue(i);
}
}
}