Create sub directory in CSharp

Description

The following code shows how to create sub directory.

Example


   /* ww  w . ja  va2  s  .  c  o m*/

using System;
using System.IO;

public class MainClass
{
  static void Main(string[] args)
  {
    DirectoryInfo MyRoot = new DirectoryInfo(@"c:\");
        MyRoot.CreateSubdirectory("MyFolder");
  }
}




















Home »
  C# Tutorial »
    IO »




File Attribute
File Security
Directory Attribute
Directory Recursive
Binary File
Text Field
Buffered IO
Create Copy Delete Move
CSV
Drive
File System Watcher
Isolated Storage
MemoryStream
Serialize
Zip