Answers for "c# create a new directory"

C#
1

how to create a new folder with c#

string dir = @"C:test";
// If directory does not exist, create it
if (!Directory.Exists(dir))
{
    Directory.CreateDirectory(dir);
}
Posted by: Guest on July-17-2021
1

c# making a folder

string path1 = @"C:temp";
string path2 = Path.Combine(path1, "temp1");

// Create directory temp1 if it doesn't exist
Directory.CreateDirectory(path2);
Posted by: Guest on May-17-2020

Code answers related to "c# create a new directory"

C# Answers by Framework

Browse Popular Code Answers by Language