Blog

How to create folder

Sep 22, 2010 Blogs | Files, Directory, IO
How to create folder in c#.
Download Files: how to create folder

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.IO;

namespace CreateFolder

{

    class Program

    {

        static void Main(string[] args)

        {

            DirectoryInfo dir = new DirectoryInfo(@"E:\owais");

            if (dir.Exists)

                Console.WriteLine("The Folder Exist");

            else

            {

                dir.Create();

                Console.WriteLine("Folder Create");

            }

            Console.WriteLine(Console.Read());

        }

    }

}

  • 559rank
  • 57K readers
COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs