How to delete a folder or directory in C#

You can use Directory.Delete method to delete a folder or directory. Just pass your full path of your folder in the Delete method.

Directory.Delete(path);