can any one tell us. how we can count numbers in string list;
the list like this.
list
"27."
"32."
"uzma"
"khan."
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vladimir NaniPosted Apr 17, 2010, 3:56 AM
int count = 0;
foreach ( string s in ms_word_doc )
{
count += Regex.Matches(s, @"\d+").Count;
}
Console.WriteLine(count);
before include System.Text.RegularExpressions;
If You Like My Answer Please Click On Accept It