title: How to use string format to omit period but leave digits
body: <p>I have the format string <code>######.00</code> used for formatting decimals in C#. I need to change it so that it omits the period but keeps the digits following the period. Can I accomplish this just by changing the format? I've searched, but haven't been able to find a solution online.</p>
  
  <p>I found <a href="https://stackoverflow.com/a/31309178/1861453">this answer</a> to a very similar question, but it involves multiplying the decimal by 100 before formatting it. I'm not able to manipulate the number going in, nor the resulting string because I don't have access to them. This is because we're using a function from a third-party library that fetches the number from elsewhere and displays it formatted to the UI. I can only provide it with a format string. (If manipulating the number or resulting string is the only way to get it in the format we can probably do it, it would just take a good deal of refactoring, so I wanted to see if there's a simpler solution first. Hence the constraints.)</p>
  
  <p>Just as an example of the output I'm looking for, consider the following code:</p>
  
  <pre><code>var myFormat = "{0:######.00}";
  Console.WriteLine(string.Format(myFormat, 1234.1234));
  Console.WriteLine(string.Format(myFormat, 5));
  </code></pre>
  
  <p>The code above currently outputs <code>1234.12</code> and <code>5.00</code>, but I would like it to output <code>123412</code> and <code>500</code> just by changing <code>myFormat</code>. Is there a way to do this?</p>