Click here to Skip to main content
12,357,409 members (72,735 online)
Click here to Skip to main content

Tagged as

Stats

3.7K views
Posted

Counting lines in a string

, 11 Jan 2012 CPOL
How about using the extension method: return s.Count(c => (c == '\n'));

Views

Downloads

License

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

Share

About the Author

George Swan
Student
Wales Wales
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 11 Jan 2012
Article Copyright 2012 by George Swan
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid