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

Vivek KumarRank #272 · 9.3K reputationPosted Jul 6, 2017, 5:13 AM EDT
Manikandan MurugesanRank #300 · 8.4K reputationPosted Jul 6, 2017, 7:59 AM EDT
Sivasankar GorantlaRank #5,536 · 296 reputationPosted Jul 6, 2017, 8:25 PM EDT
Sourabh SomaniRank #37 · 35.5K reputationPosted Jul 6, 2017, 9:12 PM EDT