Uri.IsUnc プロパティ
アセンブリ: System (system.dll 内)



指定した Uri インスタンスが UNC パス (\\server\folder、file://server/folder など) の場合、IsUnc プロパティは true です。URI のスキームが file:// で、ホスト構成要素を指定している場合、このプロパティは、必ず true を返します。

Uri インスタンスを作成し、このインスタンスが UNC パスであるかどうかを判断する例を次に示します。
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");

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からUri.IsUnc プロパティを検索する場合は、下記のリンクをクリックしてください。

- Uri.IsUnc プロパティのページへのリンク