Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void TextBoxEquation_TextChanging(TextBox sender, TextBoxTextChangingEventArgs args)
- {
- try
- {
- int selectionIndex = textBoxEquation.SelectionStart;
- string simpleNum = textBoxEquation.Text.Replace(",", "");
- var value = string.Format("{0:N0}", long.Parse(simpleNum));
- textBoxEquation.Text = value;
- textBoxEquation.SelectionStart = selectionIndex + 1;
- }
- catch { }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement