BelhardTraining.LessonMultithreading.MainWindow.GetExecutablePath C# (CSharp) Метод

GetExecutablePath() приватный статический Метод

private static GetExecutablePath ( ) : string
Результат string
        private static string GetExecutablePath()
        {
            Assembly asm = Assembly.GetExecutingAssembly();

            // Assembly. EscapedCodeBase имеет вид file://c:\SomeFolder\Assembly.dll
            // Используем свойство EscapedCodeBase вместо свойства CodeBase чтобы
            //    символ # (и подобные ему) был бы представлен как %23 и не приводил
            //    к исключению в конструкторе Uri
            // Класс Url позволяет преобразовывать file:// ссылки в локальный путь
            //    с помощью свойства LocalPath
            return new Uri(asm.EscapedCodeBase).LocalPath;
        }