Compartir a través de


Uri.SchemeDelimiter Field

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Specifies the characters that separate the communication protocol scheme from the address portion of the URI. This field is read-only.

Namespace:  System
Assembly:  System (in System.dll)

Syntax

'Declaration
Public Shared ReadOnly SchemeDelimiter As String
public static readonly string SchemeDelimiter

Examples

The following example creates a string from UriSchemeHttp, SchemeDelimiter, and an address. A Uri instance is then created from the string.

Dim address11 As String  = "www.contoso.com"
Dim uriString As String = String.Format("{0}{1}{2}/", Uri.UriSchemeHttp, Uri.SchemeDelimiter, address11)

Dim result As Uri = Nothing 
Uri.TryCreate(uriString, UriKind.Absolute, result)
If result <> Nothing Then
  outputBlock.Text &= result.ToString()
  outputBlock.Text &= " is a valid Uri"
  outputBlock.Text &= vbCrLf
Else
  outputBlock.Text &= "Uri not created"
  outputBlock.Text &= vbCrLf
End If
        string address11 = "www.contoso.com";
        string uriString = String.Format("{0}{1}{2}/", Uri.UriSchemeHttp, Uri.SchemeDelimiter, address11); 

        Uri result = null; 
        Uri.TryCreate(uriString, UriKind.Absolute, out result);
        if (result != null) {
            outputBlock.Text += result.ToString();
            outputBlock.Text += " is a valid Uri\n";
        }    
        else
            outputBlock.Text += "Uri not created\n";

            string address = "www.contoso.com";
            string uriString = String.Format("{0}{1}{2}/", Uri.UriSchemeHttp, Uri.SchemeDelimiter, address); 

            Uri result = null; 
            Uri.TryCreate(uriString, UriKind.Absolute, out result);
            if (result != null)
                Console.WriteLine("{0} is a valid Uri", result.ToString());
            else
                Console.WriteLine("Uri not created");

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference