System.Uri.LocalPath Property

Gets a local operating-system representation of a file name.

Syntax

public string LocalPath { get; }

Value

A string containing the local representation of the resource identified by the current instance.

Remarks

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.

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0