Click here to Skip to main content
14,734,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
How to find total number of word in a text file in


See here the sample to parse file for separate words and add code to count words.
Assuming you've already loaded the file into a single string called myData:

Dim parts As String() = myData.Split(" ")
Dim count As Integer = parts.Length

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900