Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with generating random fixtures
#7
(03-15-2011, 12:17 PM)thanasis2028 Wrote: You will have to use the code i gave you many times but changing the line:
Code:
TextBox1.Text = String.Format("{0} vs {1}", ListBox1.Items(r.Next(0, ListBox1.Items.Count)), ListBox2.Items(r.Next(0, ListBox2.Items.Count)))
with
Code:
TextBox1.AppendText(String.Format("{0} vs {1}", ListBox1.Items(r.Next(0, ListBox1.Items.Count)), ListBox2.Items(r.Next(0, ListBox2.Items.Count))))
You have to find a way to prevent the same name from appearing in the list again. This might be a little hard...

Thanks but I think what Untouch suggested is a much more reliable solution.
Reply


Messages In This Thread
RE: Need help with generating random fixtures - by Fragma - 03-15-2011, 12:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [How to] Create random strings(upper,lower and integers)[Src] Modestep 11 2,921 05-14-2011, 02:17 AM
Last Post: モrainee
  [Snippet] Random pick from list (Range) euverve 0 691 05-12-2011, 08:22 AM
Last Post: euverve
  [Tut] Generating Random Strings (200 Random Results = LIMIT) [Tut] Resistance 7 1,839 04-12-2011, 03:18 PM
Last Post: Resistance
  Generate Random Numbers & Letters [ Small Function ] MYPE 22 4,146 04-02-2011, 05:25 PM
Last Post: Pyratepig
  Random selection from list? pers2981 1 725 11-14-2010, 01:46 PM
Last Post: KoBE

Forum Jump:


Users browsing this thread: 1 Guest(s)