摘要:
前段时间写程序写相对路径时忘记加Application.StartupPath,出现了奇怪的错误,相对路径出现了不同的结果。实践检验了一下:原来在有打开文件对话框时,文件相对路径会等于 打开文件的磁盘+相对路径。 string raletivepath = @"\hello.txt"; private void button1_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() ==DialogResult.OK) { } this.textBox1.Text = Path.GetFull 阅读全文
浙公网安备 33010602011771号