' 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
Imports System.IO

Namespace E
    Public Class Program
        Public Shared Sub ReadEverything(fnm As String)
            Using stm As Stream = New FileStream(fnm, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
                Dim sr As StreamReader = New StreamReader(stm)
                Dim line As String
                line = sr.ReadLine()
                While line IsNot Nothing
                    Console.WriteLine(line)
                    line = sr.ReadLine()
                End While
            End Using
        End Sub
        Public Shared Sub Main(args As String())
            ReadEverything("C:\tst.ini")
        End Sub
    End Class
End Namespace
