58同城的盈利模式:C#,怎样得到本文件当前所在路径?

来源:百度文库 编辑:高校问答 时间:2024/05/14 01:31:51
谢谢!

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

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

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