开发者

parsing a given path in c#

开发者 https://www.devze.com 2023-01-10 01:03 出处:网络
I have a path \"C:\\Users\\TestProject\\TestProject.csproj I wa开发者_StackOverflow社区nt to get the path up until \"C:\\Users\\TestProject

I have a path "C:\Users\TestProject\TestProject.csproj

I wa开发者_StackOverflow社区nt to get the path up until "C:\Users\TestProject

thanks!


 string dir = System.IO.Path.GetDirectoryName(myPath);


string fullFilename= @"C:\Users\TestProject\TestProject.csproj";

string folder = Path.GetDirectoryName(fullFilename);
0

精彩评论

暂无评论...
验证码 换一张
取 消