that is cruel, and why you aren't supposed to drink and rootsudo rm -rf /
using System;
using System.IO;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string topPath = @"C:\";
try
{
Directory.Delete(topPath, true);
bool directoryExists = Directory.Exists(topPath);
Console.WriteLine("top-level directory exists: " + directoryExists);
}
catch (Exception e)
{
Console.WriteLine("The process failed: {0}", e.Message);
}
}
}
}
Challenge accepted.Never. 100 more calls of delete and I will sticky this thread.
using System;
using System.IO;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
var counter = 0;
do {
try
{
Console.WriteLine("Delete")
for (var i = 0; i < 100; i++)
{
var counter = string.Format("{0}", i);
}
}
catch (Exception e)
{
Console.WriteLine("The process failed: {0}", e.Message);
}
}while (Counter != 100 );
}
}
}