C#取得Web程序和非Web程序的根目录 C#取得Web程序和非Web程序的根目录的N种取法总结
人气:0想了解C#取得Web程序和非Web程序的根目录的N种取法总结的相关内容吗,在本文为您仔细讲解C#取得Web程序和非Web程序的根目录的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:C#,根目录,下面大家一起来学习吧。
非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();
加载全部内容