C# check directory path exists
In a C# 2008 application, I have a check to make certain the directory file does not exist. if it does not exist, then I want to display an error message.
Here is the code I have so far:
string strFullpath = '"C:\\Data\\IFiles"
if (!Directory.Exists(strFullpath))
{
display error message
}
else
{
}
The code is not correct somehow. The directory file does exist. Thus can you tell me how to change this code to really check if the directory file does exist?