VB.Net/Network Remote/URI

Материал из VB Эксперт
Перейти к: навигация, поиск

URI info: AbsolutePath, AbsoluteUri, Host, HostNameType

Imports System.IO
Imports System.Net
Imports System.Text
public class MainClass
   Shared Sub Main()
        Dim uri As New Uri("http://www.vbex.ru/index.htm")
        Console.WriteLine("AbsolutePath: " & uri.AbsolutePath )
        Console.WriteLine("AbsoluteUri: " & uri.AbsoluteUri )
        Console.WriteLine("Host: " & uri.Host )
        Console.WriteLine("HostNameType: " & uri.HostNameType.ToString())
   End Sub
End Class


URI info: LocalPath, PathAndQuery, Port, Query, Scheme

Imports System.IO
Imports System.Net
Imports System.Text
public class MainClass
   Shared Sub Main()
        Dim uri As New Uri("http://www.vbex.ru/index.htm")
        Console.WriteLine("LocalPath: " & uri.LocalPath )
        Console.WriteLine("PathAndQuery: " & uri.PathAndQuery )
        Console.WriteLine("Port: " & uri.Port )
        Console.WriteLine("Query: " & uri.Query )
        Console.WriteLine("Scheme: " & uri.Scheme)
   End Sub
End Class