SHARE
TWEET

Untitled

a guest Aug 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void TextBoxEquation_TextChanging(TextBox sender, TextBoxTextChangingEventArgs args)
  2. {
  3.     try
  4.     {
  5.         int selectionIndex = textBoxEquation.SelectionStart;
  6.         string simpleNum = textBoxEquation.Text.Replace(",", "");
  7.         var value = string.Format("{0:N0}", long.Parse(simpleNum));
  8.         textBoxEquation.Text = value;
  9.         textBoxEquation.SelectionStart = selectionIndex + 1;
  10.     }
  11.     catch { }
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top