Hi!,
This email was created by [MemberName] <[MemberEmail]> who thought you would be interested in the following Article:
"Counting lines in a string"
How about using the extension method: return s.Count(c => (c == '\n'));
CodeProject also contains hundreds of articles, free source code samples and applications to help in your day to day programming. Why not give it a try!