using System; using System.IO; class Program { static void Main(string[] args) { string path = @"C:\test\new_directory"; if (!Directory.Exists(path)) { DirectoryInfo di = Directory.CreateDirectory(path); Console.WriteLine("The directory was created successfully at {0}.", Directory.GetCreationTime(path)); } } }In the above code, we have used the CreateDirectory method to create a new directory. If the directory already exists, it will not create a new directory and throw an exception. That's why we have used the "if not exists" condition to check before creating the directory. The System.IO namespace is included in the .NET Standard library which is a set of APIs provided by Microsoft that can be used to build cross-platform applications.