Calculator - thousand separator by comma in c# private void TextBox_TextChanged(object sender, EventArgs e) { string value = TextBox.Text.Replace(",", ""); long ul; if (long.TryParse(value, out ul)) { TextBox.TextChanged -= TextBoxTextChanged; TextBox.Text = string.Format("{0:#,#0}", ul); TextBox.SelectionStart = TextBox.Text.Length; TextBox.TextChanged += TextBoxTextChanged; }}I used above code for making Calculator. I want to get results comma with decimal value by pressing equal button. Normally I can type 1,234.1234 in the textBox, but if I press 1,234.1234 + 1,234.1234 it does not give the result 2,468.2464 - it gives result only 2468.2468. I mean comma with decimal value not getting by pressing equal.Co...

Calculator - thousand separator by comma in c# private void TextBox_TextChanged(object sender, EventArgs e) { string value = TextBox.Text.Replace(",", ""); long ul; if (long.TryParse(value, out ul)) { TextBox.TextChanged -= TextBoxTextChanged; TextBox.Text = string.Format("{0:#,#0}", ul); TextBox.SelectionStart = TextBox.Text.Length; TextBox.TextChanged += TextBoxTextChanged; }}I used above code for making Calculator. I want to get results comma with decimal value by pressing equal button. Normally I can type 1,234.1234 in the textBox, but if I press 1,234.1234 + 1,234.1234 it does not give the result 2,468.2464 - it gives result only 2468.2468. I mean comma with decimal value not getting by pressing equal.Could you kindly please help me to solve this problem ?