在写类库项目时,经常会有某些特殊业务需要用到服务器端的物理路径,使用传统的System.IO.Directory.GetCurrentDirectory()方法返回的则是WINNT\System32目录,这个一般不能满足正常的业务需求,而要得到具体运行DLL所在的物理目录可以通过Assembly.GetExecutingAssembly().CodeBase属性来取得,具体参考方法如下:
        }

相关文章:

  • 2021-07-09
  • 2022-12-23
  • 2022-01-17
  • 2021-12-16
  • 2022-12-23
  • 2021-05-07
猜你喜欢
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-11-14
  • 2022-12-23
相关资源
相似解决方案