Here is a code snippet that I use, it also ignores empty lines...
Code Snippet
- string[] lines = System.Text.RegularExpressions.Regex.Split(MULTILINETEXTBOX.Text.Trim(), "\r\n");
- int lineCount = lines.Length;
End of Code Snippet
Technical blog discussing various programming languages, frameworks and paradigms. Code snippets and projects are also provided.
No comments:
Post a Comment