Feedback

GetProjectPath

/// <summary>
/// Holt den Pfad zum aktuellen Projekt-Ordner.
/// </summary>
/// <returns>der Pfad zum aktuellen Projekt-Ordner.</returns>
internal static string GetProjectPath()
{
 // Ergebnis: Debug- oder Release-Ordner im Projektordner.
         string projectPath = Environment.CurrentDirectory;
         // Mit jedem Durchlauf geht es im Verzeichnisbaum eine Stufe höher.
         for(int i = 0; i < 2; i++)
         {
            projectPath = System.IO.Path.GetDirectoryName(projectPath);
         }
         return projectPath + @"";