Uri.IsFile プロパティとは? わかりやすく解説

Uri.IsFile プロパティ

指定した Uriファイル URI かどうかを示す値を取得します

名前空間: System
アセンブリ: System (system.dll 内)
構文構文

解説解説

Scheme プロパティと UriSchemeFile が等し場合IsFile プロパティtrue です。

使用例使用例

Uri インスタンス作成し、このインスタンスファイル URI であるかどうか判断する例を次に示します

    Dim uriAddress2 As New Uri("file://server/filename.ext")
    Console.WriteLine(uriAddress2.LocalPath)
    Console.WriteLine("Uri {0} a UNC path", IIf(uriAddress2.IsUnc,
 "is", "is not"))
 'TODO: For performance reasons this should be changed to nested IF statements
    Console.WriteLine("Uri {0} a local host", IIf(uriAddress2.IsLoopback,
 "is", "is not"))
 'TODO: For performance reasons this should be changed to nested IF statements
    Console.WriteLine("Uri {0} a file", IIf(uriAddress2.IsFile,
 "is", "is not"))
 'TODO: For performance reasons this should be changed to nested IF statements

End Sub 'GetParts
Uri uriAddress2 =  new Uri("file://server/filename.ext");
Console.WriteLine(uriAddress2.LocalPath);
Console.WriteLine("Uri {0} a UNC path", uriAddress2.IsUnc ? "is"
 : "is not");
Console.WriteLine("Uri {0} a local host", uriAddress2.IsLoopback ? "is"
 : "is not");
Console.WriteLine("Uri {0} a file", uriAddress2.IsFile ? "is"
 : "is not");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Uri.IsFile プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Uri.IsFile プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS