简单有关问题,

简单问题,求助在线等!C# codeprivate void txtInvoice_Cash_TextChanged(object sender, EventArgs e) {if

简单问题,求助 在线等!

C# code
private void txtInvoice_Cash_TextChanged(object sender, EventArgs e) {       if (this.txtInvoice_Cash.Text.Length == 0)          {             this.txtInvoice_Cash.Text = "0.00";           }   //实现效果,当接收字符为.的时候,自动移动光标到文本框中最后一个点(.)后面的第一位0. }


[解决办法]
textBox1.SelectionStart = textBox1.Text.LastIndexOf(".");