So I have a set of files that I am trying to get a word count on. I am trying to enter a file path in command line and then run an executable on them to see the word count in the command line.
Code for word count that I have:
string[] words = File.ReadAllText(@"path"/*I want the path here to be read from what I enter in the command line.*/).Split(' ');
Then to find the word count:
int wordcount= words.length-1;
I then want wordcount to be returned to me in the commandline. So, to reiterate, I need to be able to enter a file into the command line, run the word counting exe on it, and return the wordcount number to the commandline. This is a homework assignment for me, so if possible it would be great if you could refer me to a place to understand how to do this if you answer. Thanks in advance to anyone that tries to help.