为什么 OpenFileDialog 会更改我的工作目录?我应该假设 System.Windows.Forms 中的许多功能会改变我的工作目录吗?
OpenFileDialog open = new OpenFileDialog();
open.Filter = filter;
a = Directory.GetCurrentDirectory(); //<-- correct
if (open.ShowDialog() == DialogResult.OK) //-- select a file on my desktop
{
a = Directory.GetCurrentDirectory(); //<-- incorrect, is set to my desktop