Hi,
How to count character from a text file in vb.net?
How to count character from a text file in vb.net
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jul 21, 2011, 4:32 AM EDT
Gurjeet SinghRank #747 · 3.1K reputationPosted Jul 21, 2011, 9:11 PM EDT
Dim M As Integer
Dim j As Integer = -1
Dim myReader As StreamReader = New StreamReader("d:\SP Change.txt")
Dim line As String
Do
M += 1
line = myReader.ReadLine()
Loop Until line Is Nothing
myReader.Close()
myReader = Nothing
TextBox1.Text = CStr(M)
End Sub