C#是否缺少 using 指令或程序集引用?
privatevoidopenFileDialogFileOk(objectsender,System.ComponentModel.CancelEventArgse){...
private void openFileDialogFileOk(object sender, System.ComponentModel.CancelEventArgs e)
{
string fullPathname = openFileDialog.FileName;
FileInfo src = new FileInfo(fullPathname);
fileName.Text = src.Name;
source.Text = "";//设置第一个Text文本框为空值
TextRenderer reader = src.OPenText();//读取打开的文件
String line = reader.ReadLine();
MessageBox.Show(line);
while(line!=null)
{
source.Text+=line+'\n';
line=reader.ReadLine();
}
reader.Close();
错误信息显示filename、readLIne缺少Using引用怎么解决 求指导 展开
{
string fullPathname = openFileDialog.FileName;
FileInfo src = new FileInfo(fullPathname);
fileName.Text = src.Name;
source.Text = "";//设置第一个Text文本框为空值
TextRenderer reader = src.OPenText();//读取打开的文件
String line = reader.ReadLine();
MessageBox.Show(line);
while(line!=null)
{
source.Text+=line+'\n';
line=reader.ReadLine();
}
reader.Close();
错误信息显示filename、readLIne缺少Using引用怎么解决 求指导 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询