110,536
社区成员
发帖
与我相关
我的任务
分享
if (tempC is MaskedTextBox)
{
int start = (tempC as MaskedTextBox).SelectionStart;
if (start == 3 || start == 7 || start == 11)
start++;
tempC.Text = (tempC as MaskedTextBox).Text.Insert(start,btn.Tag.ToString());
(tempC as MaskedTextBox).SelectionStart = start + 1;
}