private void richTextBox1_SelectionChanged( object sender , EventArgs e)
{
int X = (( RichTextBox )sender) . SelectionStart -
(( RichTextBox )sender) . GetFirstCharIndexOfCurrentLine();
int Y = (( RichTextBox )sender) . GetLineFromCharIndex(
(( RichTextBox )sender) . SelectionStart);
Text = string . Format( "Row:{0}, Col:{1}" , X, Y);
}