tumblr tracker

Exists

Library Reference ›› File ››
Parent Previous Next

File.Exists


Namespace: File


Checks whether a file exists.


retval = File.Exists(Path)


Parameters:

- Path; string constant or variable containing the file path to check for existence


Returns:

true if file exists, false otherwise; boolean value.


Example


If (File.Exists("C:\TEMP\somefile.txt"))
{
   MessageBox.ShowInfo("File Exists.");
}