Answer the question
In order to leave comments, you need to log in
How to remove Form element from List?
There is this code:
public class Randoms
{
public static Random rnd = new Random();
public void GoNext()
{
List<Form> LF = new List<Form>();
LF.Add(new Form1());
LF.Add(new Form2());
LF.Add(new Form3());
var index = rnd.Next(LF.Count);
if (LF.Count == 0)
{
Results RS = new Results();
RS.Show();
}
else
{
LF[index].Show();
LF.RemoveAt(index);
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question