Everytime i run the program it has an error that says access to the path is denied. i already check the folder allowed all users, unchecked the read only and still it wont work
private void button2_Click(object sender, EventArgs e)
{
try
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
DialogResult result = fbd.ShowDialog();
string[] files = Directory.GetFiles(fbd.SelectedPath);
textBox2.Text = fbd.SelectedPath;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}