public void EditFromModelsGuide() { string StartPath = Directory.GetParent(Application.ExecutablePath).ToString(); //Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName; //---- File from where to read string EndingPath_ModelsGuide = @"\Resources\src\ModelsGuide.txt"; string ModelsGuideTxt = StartPath + EndingPath_ModelsGuide; //--- File where to write temporary string EndingPath_Temporary = @"\Resources\src\Temporary.txt"; string TemporaryTxt = StartPath + EndingPath_Temporary; try { Treatments.EditModelRewritingFile(this.ModelID, this.Name, this.Content, this.ModelImplementations, ModelsGuideTxt, TemporaryTxt); //File.Delete(this.Content); } catch (Exception Ex) { Console.WriteLine("Error: " + Ex.Message); } }