Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
C# code to count number of lines in textbox ?
Rajavel G
Jul 6 2017 7:16 AM
510
Reply
C# code to count number of lines in text box ?
string strtext = textbox1.text;
strtext = strtext.Replace('\r', '\n').Trim();
rslt = 0;
foreach (string s in strtext.Split('\n'))
rslt++;
txtline.Text = rslt.ToString();
I tried that above.. but wrap lines of text box is not included with in count??
Thanks in Advance
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
How to my website work in Online and Offline also
How to do save data with showing the Details of Page, Confir