当前目录
stringpath= Environment.CurrentDirectory;
上级目录
string path = new DirectoryInfo("../").FullName;
上上级目录
string path = new DirectoryInfo("../../").FullName;
当前目录
stringpath= Environment.CurrentDirectory;
上级目录
string path = new DirectoryInfo("../").FullName;
上上级目录
string path = new DirectoryInfo("../../").FullName;
本文标题:C#获取当前目录、上级目录
本文链接:https://www.haomeiwen.com/subject/srvpgttx.html
网友评论