Number of strings for each row based on text files

xiaoxiao2021-03-06  65

'Number of strings for each row based on text files

Function getLinestrBytXTFile (Byval TxtFileName As String) AS ArrayList

DIM fs as io.filestream = new io.filestream (txtFileName, IO.FILEMODE.Open, IO.FILEACCESS.READ)

DIM SR As IO.StreamReader = New IO.StreamReader (fs, system.text.Encoding.getencoding ("GB2312")))

DIM ArrayStr as array = sr.readToEnd (). Split (VBCRLF)

DIM I AS INTEGER: DIM TMLIST AS New ArrayList

For i = 0 to arraystr.length - 1

TmList.Add (Arraystr.GetValue (i))

NEXT

fs.close (): Return Tmlist

END FUNCTION

转载请注明原文地址:https://www.9cbs.com/read-112105.html

New Post(0)