try
{
// 得到程序集位置
string path = System.IO.Path.GetDirectoryName(GetType().Assembly.Location);
// 得到文件位置
if (File.Exists(System.IO.Path.Combine(path, "数据库联接脚本.txt")))
{
MessageBox.Show(" 加载 数据库联接脚本 成功!" + "\r\n" + "文件位置:" + "\r\n" +
System.IO.Path.Combine(path, " 数据库联接脚本.txt"));
}
else
{
MessageBox.Show(" 加载 数据库联接脚本 失败!");
}
}
catch(Exception ex)
{
Debug.WriteLine("XBAPPro.Page1.PageLoad Exception: " + ex.Message);
MessageBox.Show(" 加载 数据库联接脚本 异常!" + "\r\n" + ex.Message);
} 我这里的文件名称叫做"数据库联接脚本.txt"
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货