Get directory of referenced DLL-File in .NET C#

Viewed 12

do anyone knows how to get the directory of the referenced DLL-File in C# code. Something like this:

Location of DLL-File:

C:\library\Lib.dll

My Code:

// C:\App\

using Lib;

namespace App
{
    public class Programm
    {
        public static void Main(string[] args)
        {
            string directory = Lib.GetReferencedDirectory(); // C:\library\
        }
    }
}

Best,

samid

0 Answers
Related