How do I get Bin Path?

后端 未结 6 1433
时光取名叫无心
时光取名叫无心 2020-12-25 09:32

I need to the the bin path of the executing assembly. How do you get it? I have a folder Plugins in the Bin/Debug and I need to get the location

6条回答
  •  悲&欢浪女
    2020-12-25 09:47

    You could do this

        Assembly asm = Assembly.GetExecutingAssembly();
        string path = System.IO.Path.GetDirectoryName(asm.Location);
    

提交回复
热议问题