如何在C#中动态创建文件夹?

如何在C#中动态创建文件夹?

问题描述:

如何在C#中动态创建文件夹?

How to create a folder dynamically in C#?

在代码文件的顶部添加以下行:

Add this line at the top of your code file:
using System.IO;



然后你可以用这段代码创建一个文件夹:


Then you can use this code to create a folder:

Directory.CreateDirectory("path here");



https://msdn.microsoft.com/en-us/library/54a0at6s%28v=vs.110%29.aspx [ ^ ]