C# DirectoryInfo Exists
Description
DirectoryInfo Exists
Gets a value indicating whether
the directory exists.
Syntax
DirectoryInfo.Exists
has the following syntax.
public override bool Exists { get; }
Example
Gets a value indicating whether the directory exists.
using System;/*from ww w.j a v a 2s .co m*/
using System.IO;
class Class1
{
public static void Main(){
DirectoryInfo target = new DirectoryInfo("c:/abc");
Console.WriteLine(target.Exists);
}
}
The code above generates the following result.