110,572
社区成员
发帖
与我相关
我的任务
分享
行值=(1+richTextBox1.GetLineFromCharIndex(richTextBox1.SelectionStart)).ToString();
列值=(1+richTextBox1.SelectionStart-(richTextBox1.GetFirstCharIndexFromLine(1+richTextBox1.GetLineFromCharIndex(richTextBox1.SelectionStart)-1))).ToString();
//p为光标位置,textBox1是查找框,textBox2是替换框
richTextbox1.Text.Remove(p, textBox1.TextLength);
richTextbox1.Text.Insert(p, textBox2.Text);
这个代码运行没反应
string re = richTextbox1.Text.Substring(p, textBox1.TextLength);
richTextbox1.Text.Substring(p, textBox1.TextLength).Replace(re,textBox2.Text);
这个也没反应,这是为什么呢