C#打开文件

来源:互联网 发布:淘宝买家地址查询 编辑:程序博客网 时间:2024/06/06 11:05
public string openXml()        {            OpenFileDialog openFile = new OpenFileDialog();            openFile.Filter = "XML文本|*.xml";            if (openFile.ShowDialog() == true)            {                return File.ReadAllText(openFile.FileName);            }            else                return null;        }

原创粉丝点击