摘要:
编写程序的时候,经常需要用的项目根目录。自己总结如下 1、取得控制台应用程序的根目录方法 方法1、Environment.CurrentDirectory 取得或设置当前工作目录的完整限定路径 方法2、AppDomain.CurrentDomain.BaseDirectory 获取基目录,它由程序集冲突解决程序用来探测程序集 2、取得Web应用程序的根目录方法 方法1、HttpRuntime.AppDomainAppPath.ToString();//获取承载在当前应用程序域中的应用程序的应用程序目录的物理驱动器路径。用于App_Data中获取 方法2、Serv... 阅读全文
posted @ 2013-01-18 16:56
钱一
阅读(169)
评论(0)
推荐(0)
摘要:
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Reflection;namespaceAssmest{publicpartialclassForm1:Form{publicForm1(){InitializeComponent();this.Text=string.Format(String.Format(" 阅读全文
posted @ 2013-01-18 16:48
钱一
阅读(2683)
评论(0)
推荐(0)
浙公网安备 33010602011771号