আমি সেই ফোল্ডারের মধ্যে একটি ফোল্ডার এবং সমস্ত ফাইল এবং ফোল্ডার মুছতে চেষ্টা করছি, আমি নীচের কোডটি ব্যবহার করছি এবং আমি ত্রুটি পেয়েছি Folder is not empty, আমি কী করতে পারি তার কোনও পরামর্শ?
try
{
var dir = new DirectoryInfo(@FolderPath);
dir.Attributes = dir.Attributes & ~FileAttributes.ReadOnly;
dir.Delete();
dataGridView1.Rows.RemoveAt(dataGridView1.SelectedRows[i].Index);
}
catch (IOException ex)
{
MessageBox.Show(ex.Message);
}