SyntaxFix
Write A Post
Hire A Developer
Questions
In my case, I needed to find the directory name of a full path (of a directory) so I simply did:
var dirName = path.Split('\\').Last();