how to trim path in C#

112

how to trim path in C# -

String dir = Path.GetDirectoryName(fullyQualifiedName);
string root = Directory.GetParent(dir).FullName;

how to trim path in C# -

path=Y:\Test\Project\bin\Debug
ans = String.Join(@"\", path.Split('\\').Skip(3));

Comments

Submit
0 Comments