//C2 Overload public Database(string name) { sourceDir = PATH.GetPath(); Name = name; Tables = new Dictionary <string, Table>(); sourceDir = Path.Combine(sourceDir, Name); try { DirectoryInfo di; // Determine whether the directory exists. if (Directory.Exists(sourceDir)) { //Console.WriteLine("That DataBase exists already."); loadTables(); return; } // Try to create the directory. di = Directory.CreateDirectory(sourceDir); //Console.WriteLine("The DataBase was created successfully at {0}.", Directory.GetCreationTime(sourceDir)); //Delete the directory. //di.Delete(); //Console.WriteLine("The directory was deleted successfully."); } catch (Exception e) { Console.WriteLine("The process failed: {0}", e.ToString()); } }
//Constructor public Database() { sourceDir = PATH.GetPath(); Tables = new Dictionary <string, Table>(); }