Uri.UriSchemeFile 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指定 URI 是指向檔案的指標。 此欄位僅供讀取。
public: static initonly System::String ^ UriSchemeFile;
public static readonly string UriSchemeFile;
staticval mutable UriSchemeFile : string
Public Shared ReadOnly UriSchemeFile As String
欄位值
範例
以下範例建立一個 Uri 實例,並判定該概型是否為 UriSchemeFile。
Uri address2 = new Uri("file://server/filename.ext");
if (address2.Scheme == Uri.UriSchemeFile)
Console.WriteLine("Uri is a file");
let address2 = Uri "file://server/filename.ext"
if address2.Scheme = Uri.UriSchemeFile then
printfn "Uri is a file"
Dim address2 As New Uri("file://server/filename.ext")
If address2.Scheme = Uri.UriSchemeFile Then
Console.WriteLine("Uri is a file")
End If
備註
在 .NET Framework 1.1 版本中,「file:///path」的 URI 被翻譯為「file:/path」。 此問題已在 2.0 版本中修正。