check if the directory path is exist c# code example
Example 1: c# check if a directory exists
string directory = @"C:\folder name";
if (Directory.Exists(directory)
{
// Directory exits!
}
Example 2: c# file exist
if (File.Exists("file.exe"))
{
//file exist
} else {
//does not exist
}