Click here to Skip to main content
12,296,109 members (60,977 online)

Articles by akemper (Tip/Trick: 1)

Tip/Trick: 1

RSS Feed
No articles have been posted.
No blogs have been submitted.

Average tips rating: 4.89

.NET Framework
General
Posted: 9 Jan 2012   Updated: 9 Jan 2012   Views: 4,271   Rating: 4.89/5    Votes: 9   Popularity: 4.77
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
I've compared your favorite with seven alternatives:static long LinesCount(string s) { long count = 0; int position = 0; while ((position = s.IndexOf('\n', position)) != -1) { count++; position++; // Skip this occurance! } ...
No reference articles have been posted.

akemper
Technical Lead E.ON
Germany Germany
No Biography provided


Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 27 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid