' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
﻿Imports System.IO
Imports System.Net
Imports System.Net.Sockets

Module Program
    Sub Main()
        Dim wc As WebClient =  New WebClient
        Dim s As String = wc.DownloadString("https://www.google.com/")
        Console.WriteLine(s)
        Using tc As New TcpClient("localhost", 12345)
            Using nstm As NetworkStream = tc.GetStream()
                Using sw As New StreamWriter(nstm)
                    sw.WriteLine("This is a test")    
                End Using
            End Using
        End Using
    End Sub
End Module
