0
我想删除文本框格式。删除文本框格式化
我格式化与下面的代码
if (!string.IsNullOrEmpty(txtBSalary.Text))
{
CultureInfo culture = new CultureInfo("en-US");
int valueBefore = Int32.Parse(txtBSalary.Text, NumberStyles.AllowThousands);
txtBSalary.Text = String.Format(culture, "{0:N}", valueBefore);
txtBSalary.Select(txtBSalary.Text.Length, 0);
}
的文本框,我尝试用下面的代码
int integerValue = Int32.Parse(txtBSalary.Text, NumberStyles.AllowThousands);
撤消格式,但我无法获得整数值
你可以显示可能在你的文本框中的示例文本? –
'我无法得到整数值'解释发生了什么!例外?结果无效? –