private static DeletePreviouslyDownloadedFiles ( ) : void | ||
return | void |
private static void DeletePreviouslyDownloadedFiles()
{
try {
string downloadDir = GetDownloadDirectory();
if (downloadDir != null) {
foreach (string file in Directory.GetFiles(downloadDir, "*.exe")) {
try {
File.Delete(file);
}
catch (Exception)
{ }
}
}
}
catch (IOException) { }
}