vb System.Uri.ToString类(方法)实例源码

下面列出了vb System.Uri.ToString 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:Syste   
' Create a new Uri from a string address.
    Dim uriAddress As New Uri("HTTP://www.Contoso.com:80/thick%20and%20thin.htm")
    
    ' Write the new Uri to the console and note the difference in the two values.
    ' ToString() gives the canonical version.  OriginalString gives the orginal 
    ' string that was passed to the constructor.
    ' The following outputs "http://www.contoso.com/thick and thin.htm".
    Console.WriteLine(uriAddress.ToString())
    
    ' The following outputs "HTTP://www.Contoso.com:80/thick%20and%20thin.htm".
    Console.WriteLine(uriAddress.OriginalString)

End Sub


问题


面经


文章

微信
公众号

扫码关注公众号