Я вижу, что есть несколько способов получить путь к папке приложения:
-
Application.StartupPath -
System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location) -
AppDomain.CurrentDomain.BaseDirectory -
System.IO.Directory.GetCurrentDirectory() -
Environment.CurrentDirectory -
System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) -
System.IO.Path.GetDirectory(Application.ExecutablePath)
Каков наилучший способ в зависимости от ситуации?