dotnet remove directory code example Example: C# delete folder with all contents Click to copySystem.IO.Directory.Delete("C:\TempTest", True)