Advertisement
Guest User

Untitled

a guest
May 26th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. GetLineFromCharIndex
  2.  
  3. GetLineFromCharIndex
  4.  
  5. this.WordWrap = false;
  6. int lineIndex = this.GetLineFromCharIndex(this.SelectionStart);
  7. string lineText = this.Lines[lineIndex];
  8. this.WordWrap = true;
  9.  
  10. long lineNumber = textBox.Text.Substring(0, textBox.SelectionStart).LongCount(chr => chr == 'r');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement