第1个回答 2013-06-13
private void Form1_Load(object sender, EventArgs e)
{
//debug下面exe相同路径
string f1=Application.StartupPath + "\\test.txt";
FileInfo fi1 = new FileInfo(f1);
fi1.Create();
//csproj相同路径
string f2 = Application.StartupPath + "\\..\\..\\test.txt";
FileInfo fi2 = new FileInfo(f2);
fi2.Create();
MessageBox.Show("ok");
}