title: How do I convert a nullable int to a string that will be safe for computers in different locales?
body: <p>I'm converting a <code>nullable integer</code> to a <code>string</code>, and Resharper warns me to use InvariantCulture.</p>
  
  <pre><code>shipment.ShipmentID.ToString()
  </code></pre>
  
  <p>A quick <strong>Alt-Enter, Enter</strong> later, gives me this:</p>
  
  <pre><code>shipment.ShipmentID.ToString(CultureInfo.InvariantCulture)
  </code></pre>
  
  <p>Unfortunately, Resharper isn't satisfied, and suggests the same thing, which doesn't make sense to me.</p>
  
  <pre><code>shipment.ShipmentID.ToString(CultureInfo.InvariantCulture, 
                                  CultureInfo.InvariantCulture)
  </code></pre>
  
  <p>ToString() on the nullable int won't build, giving me an error stating <strong>No overload method 'ToString' takes 1 arguments</strong>.</p>
  
  <p>Non-nullable ints behave differently.</p>
  
  <pre><code>int requiredInt = 3;
  // no Resharper or compiler warning
  var stringFromRequiredInt = requiredInt.ToString(CultureInfo.InvariantCulture); 
  </code></pre>
  
  <p>What should I do to convert a <code>nullable int</code> to a <code>string</code> that will be safe for computers in different locales?</p>