using system.Globalization;
private void TextBox1_TextChanged(object sender, EventArgs e)
{
if (TextBox1.Text != "" )
{
NumberFormatInfo nfi = new NumberFormatInfo();
nfi.NumberDecimalDigits = 0;
TextBox1.Text = Decimal.Parse(TextBox1.Text, NumberStyles.AllowThousands).ToString("N", nfi);
TextBox1.Select(TextBox1.Text.Length, 0);
}
else
{
TextBox1.Text = "0";
}
}
- ۱ نظر
- ۰۴ مهر ۹۴ ، ۱۷:۵۳
- ۱۶۱۷ نمایش