北京教育传销:C#,怎样得到本文件当前所在路径?

来源:百度文库 编辑:神马品牌网 时间:2024/05/03 03:22:48
谢谢!

private void button1_Click(object sender, System.EventArgs e)
{
string strPath = Application.StartupPath;
textBox1.Text = strPath ;
}

生成后的exe文件在什么目录,strPath就是那个目录名

WinForm:同上;
WebForm:Server.MapPath("FileName");