New UriBuilder : UriBuilder « System « VB.Net by API






New UriBuilder

   

Imports System.Net
Imports System.Net.Sockets


Public Class Tester
    Public Shared Sub Main

        Dim myUriBuilder As UriBuilder

        Try
            myUriBuilder = New UriBuilder("http", "www.java2s.com", 80, "/index.html")

        Catch ex As ArgumentException
            Console.WriteLine(ex.Message)
        End Try

        Dim myUri As Uri = myUriBuilder.Uri

        Console.WriteLine(myUri.ToString())

        Console.WriteLine(myUriBuilder.Scheme)
        Console.WriteLine(myUriBuilder.Port.ToString)
        Console.WriteLine(myUriBuilder.Host)
        Console.WriteLine(myUriBuilder.Path)


    End Sub
End Class

   
    
    
  








Related examples in the same category