Hi!
I just want make easy program that give me random file (string to textbox). So.. Can you please help me, and tell me how to solve this problem?
Thanks!
DirectoryInfo DI = new DirectoryInfo("D:\\*****\\******\\");
FileInfo[] FI = DI.GetFiles();
foreach (FileInfo f in FI)
listView1.Items.Add(f.ToString());
listView1.View = View.List;
Random rand = new Random();
string n = FI[rand.Next(0, FI.Length)]; <<<--- ?!
textBox1.Text = n;
many thanks!

1 answers
Either of these should work:
answered one year ago by:
17279
0
Thanks for answer. It's works fine!