Vb.net 點可以count 個txt 有幾行?

2007-06-27 2:49 am
Vb.net 點可以count 個txt 有幾行?

回答 (1)

2007-06-27 3:54 am
✔ 最佳答案
參考以下範例,
Dim oFile as System.IO.File
Dim oRead as System.IO.StreamRead er
dim intLine as integer
oRead = oFile.OpenText(“C:\sample.txt”)
intLine = 0
While oRead.Peek <> -1
LineIn = oRead.ReadLine()
if intLine=17 then
txtdata.text = linein
end if
intLine += 1
End While

oRead.Close()

msgbox intLine
參考: ME


收錄日期: 2021-04-27 14:56:53
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070626000051KK03429

檢視 Wayback Machine 備份