以下代码是在查看NOP中看到的 感觉很不错

/// <summary>         /// Gets a physical disk path of \Bin directory         /// </summary>         /// <returns>The physical path. E.g. "c:\inetpub\wwwroot\bin"</returns>         public virtual string GetBinDirectory()         {             if (HostingEnvironment.IsHosted)             {                 //hosted                 return HttpRuntime.BinDirectory;             }             //not hosted. For example, run either in unit tests             return AppDomain.CurrentDomain.BaseDirectory;         }

相关文章:

  • 2022-12-23
  • 2021-06-28
  • 2021-06-11
  • 2021-11-02
  • 2021-12-16
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2021-08-18
  • 2021-07-31
相关资源
相似解决方案