title: Custom numeric format string in Visual Basic .NET
body: <p>I'm trying to learn Visual Basic .NET step by step, but now I have a problem with a custom numeric format string using the String.Format() method.</p>
  
  <p>I have an Integer variable like this</p>
  
  <p><code>Dim x As Integer = 123456</code></p>
  
  <p>and I want to format it to 1,234.56 with the String.Format() method.
  I believed that the following was the correct format but it doesn't work:</p>
  
  <p><code>String.Format("#,###.##", x)</code></p>
  
  <p>What is the correct format string to get the result that I need?.</p>