Answers for "check if af file exist c#"

C#
17

c# check file exists

if (File.Exists(@"D:myfile.txt")) {
   Console.WriteLine("The file exists.");
}
Posted by: Guest on February-03-2020
2

check if file exist c#

if(File.Exists(@"C:file.exe"))
{
    Console.WriteLine("This file exists!");
}
else
{
  Console.WriteLine("This file does not exist!");
}
Posted by: Guest on September-29-2021

C# Answers by Framework

Browse Popular Code Answers by Language