parsing a given path in c#
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);
精彩评论