首先要导入命名空间using System.IO;然后string myDicPath = "C:Parent/Son";if (!Directory.Exists(myDicPath)) Directory.CreateDirectory(myDicPath);