GenerateCharacterCount is not .Net method. I guess you have copied it from here:
Parsing Sentences and Building Text Statics in C#[
^]
Correct?
If you want to use it, just copy the function into your code:
public int GenerateCharacterCount(string allText)
{
int rtn = 0;
string sTemp = allText;
sTemp = sTemp.Replace(Environment.NewLine, string.Empty);
sTemp = sTemp.Trim();
string[] splitSentences =
Regex.Split(sTemp,
@"(?<=['""A-Za-z0-9][\.\!\?])\s+(?=[A-Z])");
for(int cnt=0; cnt<splitSentences.Length; cnt++)
{
string sSentence = splitSentences[cnt].ToString();
sSentence = sSentence.Trim();
char[] sentence = sSentence.ToCharArray();
for (int i = 0; i < sentence.Length; i++)
{
if (char.IsLetterOrDigit(sentence[i]) ||
char.IsPunctuation(sentence[i]) ||
char.IsWhiteSpace(sentence[i]))
rtn += 1;
}
}
return rtn;
}