Check if a Directory exists in CSharp
Description
The following code shows how to check if a Directory exists.
Example
/* www .j a va2s . c om*/
using System;
using System.IO;
static class MainClass
{
static void Main(string[] args)
{
Console.WriteLine(Directory.Exists("c:\\"));
}
}
The code above generates the following result.