Choose a location:
posted 9/5/2009 by Raghav Khunger
In this blog I will explain how check a directory exists or not.I have used
Directory class Exists method to explain it.Below is the code snippet.
using System;
using System.IO;
namespace ConsoleApplication1
{
class Program
static void Main(string[] args)
bool folderExists = Directory.Exists(@"c:\windows");
}
Above i have passed c:\windows as path to check whether it exists or not
If it exists it will return true else false.
Happy Reading.!
What kind of email newsletter would you prefer to receive from CodeAsp.Net? 18