Program
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"); } } }
Output
Directory creating: D:/India D:/India/NCR D:/India/NCR/DELHI D:/India/NCR/NOIDA D:/India/NCR/GURUGRAM
Note: In above program, we need to remember, when we use "Directory" class, System.IO namespace must be included in the program.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Program
Output
Note: In above program, we need to remember, when we use "Directory" class, System.IO namespace must be included in the program.