loop through array of words from a file

How do i create fill a string array from a file. (the file is -hwk10Words.txt-) Loop through the array and put the words that begin with the letter A-F into one list box, G-R into another list box, and the words that begin with S-Z in another listbox. Then output the number of words in each label above each listbox.
Hwk10Words.txt
bob sagetAsked:
Who is Participating?
 
Shaun VermaakTechnical Specialist/DeveloperCommented:
If yes, posting assignment questions is against the EE policy, is what I read somewhere.
No, that changed last year, not that I am encouraging it

How do i create fill a string array from a file. (the file is -hwk10Words.txt-)
Either read whole file and split on linebreaks or read line-by-line and add each line to array

Loop through the array and put the words that begin with the letter A-F into one list box, G-R into another list box, and the words that begin with S-Z in another listbox. Then output the number of words in each label above each listbox.
Loop through the array and in the loop check for the first character. You can also sort the array or use Linq instead
0
 
Nitin SontakkeDeveloperCommented:
Is this an assignment?

If yes, posting assignment questions is against the EE policy, is what I read somewhere.

The filename does seem to indicate that it is home work.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.