Syntax:
DirectoryInfo DirectoryInfo.CreateSubdirectory(string path);
Program:
using System;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main()
{
DirectoryInfo d = new DirectoryInfo("mydir");
d.CreateSubdirectory("sub-dir");
Console.WriteLine("Sub-Directory created successfully");
}
}
}
Output:
Sub-Directory created successfully.