What code should I use to delete a folder in which it contains files inside it?
This code I used only deletes an empty folder.
void ApagarPasta(string nameOf, bool subPastas){
Directory.Delete(nameOf, subPastas); // Deleta a pasta e subpastas vazias apenas.
}