Uri.UriSchemeFile Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies that the URI is a pointer to a file. This field is read-only.
public: static initonly System::String ^ UriSchemeFile;
public static readonly string UriSchemeFile;
staticval mutable UriSchemeFile : string
Public Shared ReadOnly UriSchemeFile As String
Field Value
Examples
The following example creates a Uri instance and determines whether the scheme is 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
Remarks
In .NET Framework version 1.1, a "file:///path
" URI was translated to "file:/path
". This has been corrected for version 2.0.
Applies to
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om