Uri.UriSchemeFile Pole

Definicja

Określa, że identyfikator URI jest wskaźnikiem do pliku. To pole jest tylko do odczytu.

public: static initonly System::String ^ UriSchemeFile;
public static readonly string UriSchemeFile;
 staticval mutable UriSchemeFile : string
Public Shared ReadOnly UriSchemeFile As String 

Wartość pola

Przykłady

Poniższy przykład tworzy Uri wystąpienie i określa, czy schemat to UriSchemeFile.

Uri^ address2 = gcnew Uri( "file://server/filename.ext" );
if ( address2->Scheme == Uri::UriSchemeFile )
{
   Console::WriteLine( "Uri is a file" );
}
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

Uwagi

W .NET Framework wersji 1.1 identyfikator URI "file:///path" został przetłumaczony na "file:/path". Zostało to poprawione dla wersji 2.0.

Dotyczy