c#如何实现删除TextBox控件中当前光标处前一字符
###
if (textBox1.SelectionStart > 0)
{
textBox1.Text = textBox1.Text.Remove(textBox1.SelectionStart - 1, 1);
}
###
public int SelectionStart { get; set; }
// 获取或设置文本框中选定的文本起始点。
//
// 返回结果:
// 文本框中选定的文本的起始位置。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// 赋给的值小于零。
public String Remove(int startIndex, int count):
// 返回指定数量字符在当前这个实例起始点在已删除的指定的位置的新字符串。
//
// 参数:
// startIndex:
// 开始删除字符的从零开始的位置。
//
// count:
// 要删除的字符数。
//
// 返回结果:
// 一个新字符串,除所删除的字符之外,该字符串与此实例等效。
//
// 异常:
// T:System.ArgumentOutOfRangeException:
// startIndex 或 count 小于零。 或 - startIndex 加 count 指定此实例之外的位置。