I am trying to grab the contents of a directory and display each one, on a seperate row of ListBox, the code I have so far is:
private void button10_Click(object sender, EventArgs e)
{
string[] filePaths = Directory.GetFiles(@"folder");
foreach (string path in filePaths)
{
listBox2.Items.AddRange(path + Environment.NewLine);
}
}