Directory Create - CSharp System.IO

CSharp examples for System.IO:DirectoryInfo

Description

Directory Create

Demo Code


using System.Security.Cryptography;
using System.IO;/*from   ww w.j  av  a 2  s .  com*/
using System.Text;
using System.Collections.Generic;
using System;

public class Main{
        public static bool DirectoryCreate(string directoryFullPath)
      {
         System.IO.DirectoryInfo drInfo = null;

         try
         {
            drInfo = System.IO.Directory.CreateDirectory(directoryFullPath);

            return drInfo.Exists;
         }
         catch (Exception ex)
         {

            return false;
         }
      }
}

Related Tutorials