if (File.Exists(@"D:myfile.txt")) {
Console.WriteLine("The file exists.");
}
if (File.Exists("file.exe"))
{
//file exist
} else {
//does not exist
}
if(File.Exists(@"C:file.exe"))
{
Console.WriteLine("This file exists!");
}
else
{
Console.WriteLine("This file does not exist!");
}
File.Exists(path)
File.Exists(path)