在System.Windows.Forms.RichTextBox中,如何从LineNumber转换为字符位置?

时间:2009-09-16 18:20:24

标签: .net winforms richtextbox

我希望与RichTextBox.GetLineFromCharIndex()

相反

我有一个行号,我想检索该行的char索引。 该方法可能被称为RichTextBox.GetCharIndexFromLine()

简单吗?

2 个答案:

答案 0 :(得分:3)

richTextBox1.GetFirstCharIndexFromLine(int lineNumber)

答案 1 :(得分:3)

是的,方法是RichTextBox.GetFirstCharIndexFromLine(LineNumber)