1
What code should I use to delete a folder where it contains files within it?
This code I used only erases an empty folder.
void ApagarPasta(string nameOf, bool subPastas){
Directory.Delete(nameOf, subPastas); // Deleta a pasta e subpastas vazias apenas.
}
subfolders is
true
? It needs to be to delete recursively.– Felipe Avelar
Didn’t understand, the answer solved your problem? If "solved", it seems that you had no problem.
– Maniero