c# check file exists

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

Also in C#: