110,500
社区成员
发帖
与我相关
我的任务
分享
private void Button_Click(object sender, RoutedEventArgs e)
{
string s1 = "pp.txt";
if (!File.Exists(s1)) //确定指定的文件是否存在
{
MessageBox.Show("文件不存在");
return;
}
else
MessageBox.Show("文件存在");
}