C# program to create directory

C# program to create directory I am very interested to talk to you about this article. The reason is that this article contains very interesting information. Let’s go to this article

C# program to create directory

C# program to create directory

using System;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main()
        {
            Console.WriteLine("Directory creating:");
            
            Directory.CreateDirectory("D:/India");
            Console.WriteLine("D:/India");

            Directory.CreateDirectory("D:/India/NCR");
            Console.WriteLine("D:/India/NCR");

            Directory.CreateDirectory("D:/India/NCR/DELHI");
            Console.WriteLine("D:/India/NCR/DELHI");

            Directory.CreateDirectory("D:/India/NCR/NOIDA");
            Console.WriteLine("D:/India/NCR/NOIDA");

            Directory.CreateDirectory("D:/India/NCR/GURUGRAM");
            Console.WriteLine("D:/India/NCR/GURUGRAM");
        }
    }
}
Directory creating:
D:/India
D:/India/NCR
D:/India/NCR/DELHI
D:/India/NCR/NOIDA
D:/India/NCR/GURUGRAM

Final Words

We learned some interesting information through the article C# program to create directory. Also if you have any doubts about this article you can report your doubts as a comment box. Thanks

Hi, I'm Selva a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Deekshi. Here, I post about programming to help developers.

Share on:

Leave a Comment