I hate this code.  What is the slickest way to write the following:MyFile = f;            SaveFolder = Server.MapPath(\\) + returns\\;            if(!System.IO.Directory.Exists(SaveFolder) )            {                System.IO.Directory.CreateDirectory(SaveFolder);            }            MyFile.SaveAs(SaveFolder + 2011 + 000-00-0000 + .xlsx);
Streamline code for checking if a diretory exists and saving a file.
c#
Since CreateDirectory does nothing if a directory already exists, you can do this:MyFile = f;SaveFolder = Path.Combine(Server.MapPath(\\), returns);System.IO.Directory.CreateDirectory(SaveFolder);MyFile.SaveAs(SaveFolder, 2011000-00-0000.xlsx);