string exePath = Application.ExecutablePath;
解决方案 »
- 读取数据到listView,然后怎么再添加一列“状态”并对它赋值
- datagridview数据修改
- 如果别的程序调用我的程序,我如何得到该程序的信息?
- c# 求一个正则表达式 关于金额数字格式的问题
- AxWebBrowser 控件打印问题!怎么设置浏览器"页眉","页脚",up有分
- m_bitmap = new Bitmap(strFileName);打开.ico的图表出错,但打开其它格式的图片文件可以,比如png,gif,tif等
- 谁有C#便的高精度库或源码~~
- 这么简单的问题 csdn上没人会?
- 请问这段代码错在哪里啊,朋友们帮帮忙啊,急啊!
- C#中,怎么进行类型转换!
- 新手请教派生类的事件
- 请教一个问题 帮帮忙 谢谢
Application.StartupPath;
http://community.csdn.net/Expert/topic/3495/3495956.xml?temp=.6612512
/// 获取Assembly的运行路径
/// </summary>
/// <returns></returns>
private string GetAssemblyPath()
{
string _CodeBase = System.Reflection.Assembly.GetExecutingAssembly().CodeBase ; _CodeBase = _CodeBase.Substring(8,_CodeBase.Length - 8); // 8是 file:// 的长度 string[] arrSection = _CodeBase.Split(new char[]{'/'});
string _FolderPath = "";
for(int i=0;i<arrSection.Length-1;i++)
{
_FolderPath += arrSection[i] + "/";
} return _FolderPath;
}