StreamReader sr;下面我要用IF语句做一个判断,如果为空的话就打开对话框,不是空就执行其他代码。 if (sr**这里怎么写判断?**) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { sr = new StreamReader(openFileDialog1.FileName, Encoding.Unicode); }