klijo
klijo

Reputation: 16431

adding escape sequence to Directory.GetCurrentDirectory()

The path that is returned from Directory.GetCurrentDirectory() contains non escaped '\' characters. How do i escape them ?

Upvotes: 0

Views: 577

Answers (1)

keyboardP
keyboardP

Reputation: 69372

You could do a replace:

string escapedPath = unescapedPath.Replace(@"\", @"\\");

Upvotes: 3

Related Questions