我需要在文本框中突出显示解析JSON时出错的行:
{
"datalist":
{
"name":"abc",
"collegename":"xyz",
"degree":"123"
}
}
我试过了:
txtBox1.SelectionStart = txtBox1.GetFirstCharIndexFromLine(exceptionObject.Lineposition);
txtBox1.SelectionLength = 10;
txtBox1.setFocus();
但发生错误时,文本行不会突出显示。