public static void TryDeleteDirectory(string target_dir) { try { Directory.Delete(target_dir, true); } catch (Exception) { } }