February 14, 2014
Gets a local operating-system representation of a file name.
Assembly: System (in System.dll)
The value returned by this property is unescaped. If the path is recognized as a Windows file path, all forward slashes (/) are replaced by backward slashes (\).
For the URI file://computer/file.ext, the absolute path is /file.ext and the local path is \\computer\file.ext.
LocalPath does not convert the forward slash (/) to a backslash (\). This is because file-based URIs (URIs of the form file://) are not allowed. Paths returned are relative paths.
The following example creates a Uri instance and writes the local path to the console.