Directory.CreateDirectory does not throw error if the directory already exists.
By [)ia6l0 iii
The System.IO exception as per the article does not happen. I know this does not optimize your code, but definetely removes the redundant code
So do not do the Directory.Exists check before Creating the directory
//if (!Directory.Exists(workDirectory))
Directory.CreateDirectory(workDirectory);
Directory.CreateDirectory does not throw error if the directory already exists. (1297 Views)