Click here to Skip to main content
15,881,600 members
Articles / Programming Languages / C#

Counting Lines in a String

Rate me:
Please Sign up or sign in to vote.
4.87/5 (30 votes)
18 Jun 2012CPOL3 min read 168.3K   273   34  
It seems like an obvious requirement, but the .NET framework will not count occurrences of a character in a string. It's easy to do, but which way is the quickest?

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
CEO
Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?

Comments and Discussions