C#取得Web程序和非Web程序的根目錄的N種取法總結
更新時間:2008年03月09日 20:21:40 作者:
C#取得Web程序和非Web程序的根目錄的N種取法,方便大家知道,有更好的方法,請說明
非Web程序
1.AppDomain.CurrentDomain.BaseDirectory
2.Environment.CurrentDirectory
3.HttpRuntime.BinDirectory
The path to the current application's/bin directory.
Web程序
HttpCurrent.Context.Server.Mappath();
1.AppDomain.CurrentDomain.BaseDirectory
2.Environment.CurrentDirectory
3.HttpRuntime.BinDirectory
The path to the current application's/bin directory.
Web程序
HttpCurrent.Context.Server.Mappath();
相關文章
Unity UGUI的EventTrigger事件監(jiān)聽器組件介紹使用示例
這篇文章主要為大家介紹了Unity UGUI的EventTrigger事件監(jiān)聽器組件介紹及使用,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2023-08-08
C#使用Selenium+PhantomJS抓取數(shù)據(jù)
本文主要介紹了C#使用Selenium+PhantomJS抓取數(shù)據(jù)的方法步驟,具有很好的參考價值,下面跟著小編一起來看下吧2017-02-02
C#發(fā)送數(shù)據(jù)到剪貼板及從剪貼板中取數(shù)據(jù)的方法
這篇文章主要介紹了C#發(fā)送數(shù)據(jù)到剪貼板及從剪貼板中取數(shù)據(jù)的方法,涉及C#針對剪貼板數(shù)據(jù)的讀寫操作技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-07-07

