The Directory property of the FileInfo class has a method called Create that can be used to create the new directory. The full path of the directory is supplied as the argument of FileInfo constructor.
static void Main(string args)
FileInfo f = new FileInfo("D:\\newdir\\");
Console.WriteLine(f.DirectoryName+ " created!" );
else Console.WriteLine("The direct already exists.");
Posted by: Dara | post date: 01-30-2013 | Subject: C# Programming Language
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: