10-12-19 11:01 PM
11-12-19 10:58 AM
' Assume success Success = True Message = "" Dim enc As System.Text.Encoding Try enc = System.Text.Encoding.GetEncoding(EncodingName) Lines = New DataTable() Lines.Columns.Add("Line", GetType(String)) Using sr As New StreamReader(File_Path, enc) EOF = False Start_Line = Math.Max(1, Start_Line) Dim line as String Dim lineNo As Integer = 0 Do line = sr.ReadLine() lineNo += 1 If line Is Nothing Then EOF = True : Exit Do If lineNo >= Start_Line Then Lines.Rows.Add(line) If lineNo = End_Line Then Exit Do Loop Until line Is Nothing Line_Count = Lines.Rows.Count End Using Catch ex As Exception Success = False Message = ex.Message End Try
12-12-19 08:56 PM
08-01-20 01:58 PM