I am wondering is there any functions in c# that helps to count number of words,sentences in a file…?
Now I used the following code is it efficient/error free?
string[] words=datafromfile.Split(' ');
int numberofwords=words.GetUpperBound(0)
Thank you
You could use
RegEx.Splitusing the word boundary\binstead.