How to create a directory if it does not exist in C#

1 Answer

0 votes
using System.IO;

class Program
{
    static void Main() {
        if (!Directory.Exists("project1")) {
            Directory.CreateDirectory("project1");  
        }
    }
}




/*
run:


*/

 



answered Jul 26, 2023 by avibootz
edited Jul 26, 2023 by avibootz
...