title: Date & Number Localization in WPF
body: <p>I'm a novice at C# and WPF technology. I'm trying to understand how can I apply PC's local setting to display time, date and numbers in the UI. I've tried the following code:</p>
  
  <pre><code>public MainWindow()
  {
      InitializeComponent();
  
      textBox1.AppendText(DateTime.Now.ToString() + "\n");
  
      int a = 123456789;
      string sa = a.ToString();
      textBox1.AppendText(sa + "\n");
  
      sa = a.ToString(CultureInfo.CurrentCulture);
      textBox1.AppendText(sa + "\n");
  }
  </code></pre>
  
  <p>The output in the text box is as follows:</p>
  
  <pre><code>May 29, 13 105731
  123456789
  123456789
  </code></pre>
  
  <p>The date and time is formatted correctly according to the PC setting. But the numbers should be shown as <code>123,456,789.00</code> according to PC's regional setting, which is not the case.</p>
  
  <p>So, why the number is not formatted when <code>ToString()</code> is used?</p>
  
  <p>I'm using .NET 4.0.</p>