So what IS the right direction of the path's slash (/ or \) under Windows?

backslash, path, uri

Solution

A file path and a URI are different. `\` is correct in a Windows file path and `/` is correct in a URI.

So this file path: `C:\Documents\Foo` translates to this URI: `file:///C:/Documents/Foo`

Problem

It seems Windows insists on writing a backslash `\` in file paths, whereas .NET's URI class writes them with a slash `/`. Is there any right way, that is accepted even in the most primitive systems? And why is .NET's URI showing the other slash compared with the rest of Windows?

Original source

Related problems