Im trying to count number of lines in a textBox, how can i find the nu
Im trying to count number of lines in a textBox, how can i find the number of new lines.
If i use TextBox.Text.Contains("\n") i get true if i make a enter. But i cant search for \n using a loop. Is the \n for newline a way to count them or do i need to use LR/CR in some way to fix this?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajanikant HawaldarRank #110 · 20.2K reputationPosted Mar 6, 2021, 5:41 AM EST